[pve-devel] [PATCH pve-container] fix some warnings shown during 'make dinstall'

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Sep 2 08:10:46 CEST 2015


---
 src/lxc-pve-mount-hook    | 2 +-
 src/lxc-pve-poststop-hook | 2 +-
 src/lxc-pve-prestart-hook | 2 +-
 src/lxcnetaddbr           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lxc-pve-mount-hook b/src/lxc-pve-mount-hook
index 5ca33ee..c4bccae 100755
--- a/src/lxc-pve-mount-hook
+++ b/src/lxc-pve-mount-hook
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-exit 0 if $ENV{'LXC_NAME'} !~ /^\d+$/;
+exit 0 if $ENV{LXC_NAME} && $ENV{LXC_NAME} !~ /^\d+$/;
 
 use POSIX;
 use File::Path;
diff --git a/src/lxc-pve-poststop-hook b/src/lxc-pve-poststop-hook
index 17463e8..9b9be0d 100755
--- a/src/lxc-pve-poststop-hook
+++ b/src/lxc-pve-poststop-hook
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-exit 0 if $ENV{'LXC_NAME'} !~ /^\d+$/;
+exit 0 if $ENV{LXC_NAME} && $ENV{LXC_NAME} !~ /^\d+$/;
 
 use POSIX;
 use File::Path;
diff --git a/src/lxc-pve-prestart-hook b/src/lxc-pve-prestart-hook
index 4de47c9..04caff3 100755
--- a/src/lxc-pve-prestart-hook
+++ b/src/lxc-pve-prestart-hook
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-exit 0 if $ENV{'LXC_NAME'} !~ /^\d+$/;
+exit 0 if $ENV{LXC_NAME} && $ENV{LXC_NAME} !~ /^\d+$/;
 
 use POSIX;
 use File::Path;
diff --git a/src/lxcnetaddbr b/src/lxcnetaddbr
index aca6191..44ba24a 100755
--- a/src/lxcnetaddbr
+++ b/src/lxcnetaddbr
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-exit 0 if $ENV{LXC_NAME} !~ /^\d+$/;
+exit 0 if $ENV{LXC_NAME} && $ENV{LXC_NAME} !~ /^\d+$/;
 
 use PVE::LXC;
 use PVE::Tools qw(run_command);
-- 
2.1.4




More information about the pve-devel mailing list