From 4bc914d0e6e22b871991316ff7896dc149eb8b49 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Mon, 12 Mar 2012 07:48:52 +0000 Subject: [PATCH] fix bug 3496892: need to check the state of lpar strictly git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11815 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/LparNetbootExp.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/LparNetbootExp.pm b/perl-xCAT/xCAT/LparNetbootExp.pm index 3d43f3439..aa9f92ba7 100644 --- a/perl-xCAT/xCAT/LparNetbootExp.pm +++ b/perl-xCAT/xCAT/LparNetbootExp.pm @@ -2594,7 +2594,7 @@ sub lparnetbootexp # if -o is not used, power node of #################################### unless ($from_of) { - if (($output =~ /off/i) or ($output =~ /Not Activated/i) ) { + if (($output =~ /^off$/i) or ($output =~ /Not Activated/i) ) { nc_msg($verbose, "# Power off complete.\n"); } else { nc_msg($verbose, "# Begin to Power off the node.\n"); @@ -2622,7 +2622,7 @@ sub lparnetbootexp $query_count = 0; while (!$done) { $output = xCAT::LparNetbootExp->run_lssyscfg($subreq, $verbose, $node); - if (($output =~ /off/i) or ($output =~ /Not Activated/)) { + if (($output =~ /^off$/i) or ($output =~ /Not Activated/)) { nc_msg($verbose, "Power off complete.\n"); $done = 1; next; @@ -3180,7 +3180,7 @@ sub lparnetbootexp # separate the nodename from the query status ############################################## if ($from_of != 1) { - if (( $output =~ /off/i ) or ($output =~ /Not Activated/i)) { + if (( $output =~ /^off$/i ) or ($output =~ /Not Activated/i)) { $done = 1; } } else {