[pve-devel] applied: [PATCH zsync] don't check binaries for help and printpod commands

Thomas Lamprecht t.lamprecht at proxmox.com
Tue May 15 13:54:35 CEST 2018


On 5/15/18 1:38 PM, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
>  pve-zsync | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/pve-zsync b/pve-zsync
> index dd3dee4..56b47fc 100755
> --- 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]
> 




More information about the pve-devel mailing list