From 76ddb876d937e767b0d7c7d7be14a644b91b6ce5 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 23 Apr 2021 14:14:36 +0200 Subject: [PATCH] pbs: rework client exe handling and error message Signed-off-by: Thomas Lamprecht --- src/PVE/PBSClient.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm index 537fd83..bfeae3b 100644 --- a/src/PVE/PBSClient.pm +++ b/src/PVE/PBSClient.pm @@ -140,12 +140,11 @@ my $USE_CRYPT_PARAMS = { my sub do_raw_client_cmd { my ($self, $client_cmd, $param, %opts) = @_; + my $client_bin = (delete $opts{binary}) || 'proxmox-backup-client'; my $use_crypto = $USE_CRYPT_PARAMS->{$client_cmd}; - my $client_exe = (delete $opts{binary}) || 'proxmox-backup-client'; - $client_exe = "/usr/bin/$client_exe"; - die "executable not found '$client_exe'! proxmox-backup-client or proxmox-backup-file-restore not installed?\n" - if ! -x $client_exe; + my $client_exe = "/usr/bin/$client_bin"; + die "executable not found '$client_exe'! $client_bin not installed?\n" if ! -x $client_exe; my $scfg = $self->{scfg}; my $repo = get_repository($scfg); -- 2.39.2