]> git.proxmox.com Git - pve-zsync.git/commitdiff
don't check binaries for help and printpod commands
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 15 May 2018 11:38:57 +0000 (13:38 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 May 2018 11:53:05 +0000 (13:53 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
pve-zsync

index dd3dee4db27c31dbd5a0c89520e4ecf8d0b7f350..56b47fc669fad9d1a06f2ae1b46000b9a896b998 100755 (executable)
--- a/pve-zsync
+++ b/pve-zsync
@@ -46,10 +46,14 @@ my $HOSTRE = "(?:$HOSTv4RE1|\\[$IPV6RE\\])";       # ipv6 must always be in brac
 # targets are either a VMID, or a 'host:zpool/path' with 'host:' being optional
 my $TARGETRE = qr!^(?:($HOSTRE):)?(\d+|(?:[\w\-_]+)(/.+)?)$!;
 
-check_bin ('cstream');
-check_bin ('zfs');
-check_bin ('ssh');
-check_bin ('scp');
+my $command = $ARGV[0];
+
+if (defined($command) && $command ne 'help' && $command ne 'printpod') {
+    check_bin ('cstream');
+    check_bin ('zfs');
+    check_bin ('ssh');
+    check_bin ('scp');
+}
 
 $SIG{TERM} = $SIG{QUIT} = $SIG{PIPE} = $SIG{HUP} = $SIG{KILL} = $SIG{INT} =
     sub {
@@ -1016,8 +1020,6 @@ sub disable_job {
     update_cron($job);
 }
 
-my $command = $ARGV[0];
-
 my $cmd_help = {
     destroy => qq{
 $PROGNAME destroy -source <string> [OPTIONS]