]> git.proxmox.com Git - pve-access-control.git/commitdiff
pveum: check for $cmd being defined
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 10 Jun 2015 07:20:00 +0000 (09:20 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 10 Jun 2015 08:39:08 +0000 (10:39 +0200)
fixes an 'undefined value' error when no command is
specified.

pveum

diff --git a/pveum b/pveum
index a80b4defb9ec83be530b96f7830cf379e47f77ba..c9d602e589869300cdd699341689d56e5f6592a2 100755 (executable)
--- 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();