]> git.proxmox.com Git - pve-manager.git/blobdiff - PVE/VZDump.pm
vzdump: transform hook script checks to post-if notation
[pve-manager.git] / PVE / VZDump.pm
index 16e3e888c2858d554df791a9bea1d957fb91b3b8..22fdb324e39df3090afd9590457865acecb36430 100644 (file)
@@ -669,13 +669,8 @@ sub run_hook_script {
     my $script = $opts->{script};
     return if !$script;
 
-    if (!-f $script) {
-       die "Error: The hook script '$script' does not exist.\n";
-    }
-
-    if (!-x $script) {
-       die "Error: The hook script '$script' is not executable.\n";
-    }
+    die "Error: The hook script '$script' does not exist.\n" if ! -f $script;
+    die "Error: The hook script '$script' is not executable.\n" if ! -x $script;
 
     my $cmd = [$script, $phase];