From fc764cd421dffd7738b44298eae20f252822fd65 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 14 Apr 2020 08:18:51 +0200 Subject: [PATCH] Fix $glock scope Thanks to Thomas Wagner wagner-thomas@gmx.at --- virt-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-backup b/virt-backup index a548333..56e1ced 100644 --- a/virt-backup +++ b/virt-backup @@ -250,7 +250,7 @@ my $locker = LockFile::Simple->make( my $glock = undef; if ($opts{action} =~ m/^dump|convert|chunkmount$/){ print "Trying to acquire an exclusive lock\n" if ($opts{debug}); - my $glock = $locker->lock($opts{lockdir} . '/virt-backup') || die "Can't acquire exclusive lock\n"; + $glock = $locker->lock($opts{lockdir} . '/virt-backup') || die "Can't acquire exclusive lock\n"; } foreach our $vm (@vms){