From: Wolfgang Bumiller Date: Wed, 10 Jun 2015 07:20:00 +0000 (+0200) Subject: pveum: check for $cmd being defined X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=commitdiff_plain;h=ef740495f04af742c3defb8a034167ecb1713c15 pveum: check for $cmd being defined fixes an 'undefined value' error when no command is specified. --- 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();