vzdump: transform hook script checks to post-if notation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
a2cfe4ba6d
commit
6bf4c35dda
@ -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];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user