diff --git a/perl-xCAT/xCAT/FSPflash.pm b/perl-xCAT/xCAT/FSPflash.pm index 43127e918..44c4b7ec0 100644 --- a/perl-xCAT/xCAT/FSPflash.pm +++ b/perl-xCAT/xCAT/FSPflash.pm @@ -44,7 +44,11 @@ sub dpush { # Parse the command line for options and operands ########################################################################## sub parse_args { - xCAT::PPCrflash::parse_args(@_); + my $req = shift; + $req->{mgt} = __PACKAGE__; + my $opt = xCAT::PPCrflash::parse_args($req); + delete($req->{mgt}); + return $opt; } ########################################################################## diff --git a/perl-xCAT/xCAT/PPCrflash.pm b/perl-xCAT/xCAT/PPCrflash.pm index 9f7520165..6362624e7 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -51,7 +51,6 @@ sub parse_args { my %opt = (); my $cmd = $request->{command}; my $args = $request->{arg}; - ############################################# # Change CEC/Frame node into FSPs/BPAs ############################################# @@ -159,10 +158,15 @@ sub parse_args { #--activate's value only can be concurrent and disruptive ################################ if(exists($opt{activate})) { - if( ($opt{activate} ne "deferred") && ($opt{activate} ne "disruptive")) { - return (usage("--activate's value can only be deferred or disruptive")); + if (defined($request->{mgt}) && $request->{mgt} =~ /xCAT::FSP/i) { + if ($opt{activate} !~ /deferred|disruptive/) { + return (usage("--activate's value can only be deferred or disruptive.")); + } + } else { + if(($opt{activate} ne "disruptive") && ($opt{activate} ne "concurrent")) { + return (usage("--activate's value can only be disruptive or concurrent.")); + } } - if(!exists( $opt{d} )) { $opt{d} = "/tmp"; } @@ -540,8 +544,8 @@ sub get_lic_filenames { # } } else { $msg = $msg . "Upgrade $mtms!"; - if($activate !~ /^(disruptive|deferred)$/) { - $msg = "Option --activate's value shouldn't be $activate, and it must be disruptive or deferred"; + if($activate !~ /^(disruptive|concurrent)$/) { + $msg = "Option --activate's value shouldn't be $activate, and it must be disruptive or concurrent"; return ("", "","", $msg, -1); } }