From 1574a590a5a3ee7c91fef2cfc0f9100134c46fda Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 19 Feb 2020 14:50:42 +0100 Subject: [PATCH] check if client executable ist installed before running command Signed-off-by: Thomas Lamprecht --- PVE/Storage/PBSPlugin.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index 2ac9ea0..2c2a131 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -90,6 +90,10 @@ sub pbs_get_password { sub run_raw_client_cmd { my ($scfg, $storeid, $client_cmd, $param, %opts) = @_; + my $client_exe = '/usr/bin/proxmox-backup-client'; + die "executable not found '$client_exe'! Proxmox backup client not installed?\n" + if ! -x $client_exe; + my $server = $scfg->{server}; my $datastore = $scfg->{datastore}; my $username = $scfg->{username} // 'root@pam'; @@ -100,7 +104,7 @@ sub run_raw_client_cmd { push @$cmd, @$userns_cmd if defined($userns_cmd); - push @$cmd, "/usr/bin/proxmox-backup-client", $client_cmd; + push @$cmd, $client_exe, $client_cmd; push @$cmd, @$param if defined($param);