From 4cec37a0715dd8b18234496ea747ab8e036e4f90 Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 22 Apr 2011 07:53:51 +0000 Subject: [PATCH] when the cec or bpa is in standby state, it's in on state git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9375 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPpower.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/FSPpower.pm b/perl-xCAT/xCAT/FSPpower.pm index 42c95e361..e24898833 100644 --- a/perl-xCAT/xCAT/FSPpower.pm +++ b/perl-xCAT/xCAT/FSPpower.pm @@ -236,14 +236,15 @@ sub powercmd { # Queries CEC/LPAR power status (On or Off) for powercmd_boot ########################################################################## sub power_status { - + my $value = shift; my @states = ( "Operating|operating", "Running|running", + "standby", "Open Firmware|open-firmware" ); - foreach ( @states ) { - if ( /$_[0]/ ) { + foreach my $s ( @states ) { + if ($value =~ /$s/ ) { return("on"); } }