Just a small bug fix for the pvecm script which did not verify the argument 
existence during the $ARGV[0] check (when argument not used).

Script run error -> Use of uninitialized value $ARGV[0] in string ne at 
/usr/bin/pvecm line 26.

Signed-off-by: Alen Grizonic <a.grizo...@proxmox.com>
---
 data/PVE/pvecm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/PVE/pvecm b/data/PVE/pvecm
index 5017e9d..3e6e25f 100755
--- a/data/PVE/pvecm
+++ b/data/PVE/pvecm
@@ -23,7 +23,7 @@ $ENV{HOME} = '/root'; # for ssh-copy-id
 
 my ($local_ip_address, $nodename);
 
-if ($ARGV[0] ne 'printmanpod' && $ARGV[0] ne 'verifyapi') {
+if (defined $ARGV[0] && $ARGV[0] ne 'printmanpod' && $ARGV[0] ne 'verifyapi') {
     die "please run as root\n" if $> != 0;
 
     $nodename = PVE::INotify::nodename();
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to