From ef740495f04af742c3defb8a034167ecb1713c15 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 10 Jun 2015 09:20:00 +0200 Subject: [PATCH] pveum: check for $cmd being defined 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.39.2