From 5979889332f918880832a954d1a9563ea39b293a Mon Sep 17 00:00:00 2001 From: Moayad Almalat Date: Thu, 12 Mar 2020 12:18:18 +0100 Subject: [PATCH] fix #2634: print specific error if hook-script is not executable Signed-off-by: Moayad Almalat Tested-by: Oguz Bektas --- PVE/VZDump.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index ada3681e..5f7f7725 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -571,6 +571,12 @@ sub run_hook_script { return if !$script; + if (!-x $script) { + die "The hook-script '$script' is not executable.\n" + } + + + my $cmd = "$script $phase"; $cmd .= " $task->{mode} $task->{vmid}" if ($task); -- 2.39.2