From d0d7d0fca7b0d7c1e3513bb8a260e922c534b744 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Fri, 21 Dec 2012 09:04:57 +0000 Subject: [PATCH] fix bug 3262:rflash firmware update with --activate concurrent to HMC CEC powerd off CEC git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14701 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCrflash.pm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/perl-xCAT/xCAT/PPCrflash.pm b/perl-xCAT/xCAT/PPCrflash.pm index 90ecdb7e1..9fa55d791 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -533,18 +533,22 @@ sub get_lic_filenames { ############# if($fff ne $2) { $upgrade_required = 1; + if($activate ne "disruptive") { + $msg = "Option --activate's value should be 'disruptive'"; + return ("", "","", $msg, -1); + } } else { - if(($pns eq $1) && ($4 <= $active_level)) { - $msg = $msg. "Upgrade $mtms $activate!"; - # if($activate ne "concurrent") { - # $msg = "Option --actviate's value should be disruptive"; - # return ("", "","", $msg, -1); - # } + if(($pns eq $1) && ($3 > $active_level) && ($4 <= $active_level)) { + $msg = $msg. "Upgrade $mtms $activate!"; + if($activate ne "concurrent") { + $msg = "Option --actviate's value should be 'concurrent'"; + return ("", "","", $msg, -1); + } } else { - $msg = $msg . "Upgrade $mtms!"; - if($activate !~ /^(disruptive|concurrent)$/) { - $msg = "Option --activate's value shouldn't be $activate, and it must be disruptive or concurrent"; + $msg = $msg . "Upgrade $mtms!"; + if($activate ne "disruptive") { + $msg = "Option --activate's value should be 'disruptive'"; return ("", "","", $msg, -1); } }