2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-24 15:05:36 +00:00

"rinstall xxx" command should be valid and perform provision by default

This commit is contained in:
immarvin
2017-07-04 02:59:35 -04:00
parent 55bdc98955
commit c6202a7728

View File

@ -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)."'"];
}
}