From c6202a7728da36a90fd9b505f6b677ce02505e1e Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 4 Jul 2017 02:59:35 -0400 Subject: [PATCH] "rinstall xxx" command should be valid and perform provision by default --- perl-xCAT/xCAT/Usage.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index b0348dd53..ce0df5cd6 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -4,7 +4,6 @@ package xCAT::Usage; use Getopt::Long; use xCAT::Utils; - #------------------------------------------------------------------------------- =head1 xCAT::Usage @@ -647,11 +646,11 @@ sub validateArgs { #filtered by GetOpt subroutine #fortunately the commands in this branch does not have such options foreach(@extrargs){ - if($_ !~ m/^-[-]?\S+/){ + if($_ and $_ !~ m/^-[-]?\S+/){ $count+=1; } } - if ($count!=1) { + unless (($command =~ m/^(rinstall|winstall)$/ and $count==0) or $count==1) { return [1,"Invalid argument: '".join(" ",@extrargs)."'"]; } }