From f6deceee5d4b97b046f16504ec2950c351a00598 Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 9 Mar 2012 10:20:05 +0000 Subject: [PATCH] fix a defect after invoking the cec_state to get the blade state git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11803 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPbootseq.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/FSPbootseq.pm b/perl-xCAT/xCAT/FSPbootseq.pm index c26ba6aad..190b7cf36 100644 --- a/perl-xCAT/xCAT/FSPbootseq.pm +++ b/perl-xCAT/xCAT/FSPbootseq.pm @@ -137,7 +137,11 @@ sub rbootseq { } # add checking the power state of the cec my $power_state = xCAT::FSPUtils::fsp_api_action ($node_name, $d, "cec_state", $tooltype); - unless (@$power_state and @$power_state =~ /operating|standby/) { + if ( @$power_state[2] != 0 ) { + push @output, [$node_name, @$power_state[1], -1 ]; + return (\@output); + } + unless (@$power_state[1] and @$power_state[1] =~ /operating|standby/) { my $machine; my $state; if ($$d[4] eq 'blade') { @@ -148,7 +152,7 @@ sub rbootseq { $state = "power on"; } - push @output, [$node_name, "\'boot\' command can only support while the $machine is in the \'$state\' state, -1"]; + push @output, [$node_name, "\'boot\' command can only support while the $machine is in the \'$state\' state", -1]; return (\@output); } if( $opt->{net} ) {