fix bug 3120 rflash working with --activate concurrent failing on HMC based P7 server

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13956 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-10-08 10:02:38 +00:00
parent 3ac841c96c
commit 347094fa7c
2 changed files with 15 additions and 7 deletions

View File

@ -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;
}
##########################################################################

View File

@ -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);
}
}