[pve-devel] [PATCH] pveum: check for $cmd being defined
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Jun 10 09:20:00 CEST 2015
fixes an 'undefined value' error when no command is
specified.
---
pveum | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pveum b/pveum
index a80b4de..c9d602e 100755
--- a/pveum
+++ b/pveum
@@ -69,7 +69,7 @@ my $cmddef = {
my $cmd = shift;
-if ($cmd ne 'verifyapi' && $cmd ne 'printmanpod') {
+if (defined($cmd) && $cmd ne 'verifyapi' && $cmd ne 'printmanpod') {
die "please run as root\n" if $> != 0;
PVE::INotify::inotify_init();
--
2.1.4
More information about the pve-devel
mailing list