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/branches/2.7@13955 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-10-08 09:54:20 +00:00
parent 6ee370cfbe
commit 1664ed82d8
2 changed files with 16 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

@ -157,10 +157,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} ne "deferred") && ($opt{activate} ne "disruptive")) {
return (usage("--activate's value can only be deferred or disruptive"));
}
} else {
if( ($opt{activate} ne "concurrent") && ($opt{activate} ne "disruptive")) {
return (usage("--activate's value can only be disruptive or concurrent"));
}
}
if(!exists( $opt{d} )) {
$opt{d} = "/tmp";
}
@ -538,8 +543,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);
}
}