pveum: check for $cmd being defined

fixes an 'undefined value' error when no command is
specified.
This commit is contained in:
Wolfgang Bumiller 2015-06-10 09:20:00 +02:00 committed by Dietmar Maurer
parent 98a34e3ff8
commit ef740495f0

2
pveum
View File

@ -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();