[pve-devel] [PATCH] create lockdir if not exist.
Alexandre Derumier
aderumier at odiso.com
Sat May 2 17:07:05 CEST 2015
/run/ is a tmpfs on jessie and don't persist across reboot
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
src/PVE/LXC.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 6afe690..1e54ad5 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -437,6 +437,8 @@ sub lock_aquire {
my $filename = lock_filename($vmid);
+ mkdir $lockdir if !-d $lockdir;
+
my $lock_func = sub {
if (!$lock_handles->{$$}->{$filename}) {
my $fh = new IO::File(">>$filename") ||
--
2.1.4
More information about the pve-devel
mailing list