]> git.proxmox.com Git - pve-container.git/commitdiff
prestart hook: avoid variable declared in conditional statement
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 14:42:41 +0000 (16:42 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 14:42:41 +0000 (16:42 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/lxc-pve-prestart-hook

index 2911e1be7bb7587eb0e820a4cc3083efa3bc1cd8..3bdf7e4bd67e92e510dca9919e2cada1bc5af98e 100755 (executable)
@@ -35,7 +35,7 @@ PVE::LXC::Tools::lxc_hook('pre-start', 'lxc', sub {
     my ($vmid, $vars, undef, undef) = @_;
 
     my $skiplock_flag_fn = "/run/lxc/skiplock-$vmid";
-    my $skiplock = 1 if -e $skiplock_flag_fn;
+    my $skiplock = -e $skiplock_flag_fn;
     unlink $skiplock_flag_fn if $skiplock;
 
     PVE::Cluster::check_cfs_quorum(); # only start if we have quorum