From 1664ed82d8c85ed9bc415235f95fc7ff183d2d04 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Mon, 8 Oct 2012 09:54:20 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/FSPflash.pm | 6 +++++- perl-xCAT/xCAT/PPCrflash.pm | 17 +++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/perl-xCAT/xCAT/FSPflash.pm b/perl-xCAT/xCAT/FSPflash.pm index a2ab02ce8..e45ec6203 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 232e5821d..90ecdb7e1 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -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); } }