fixed bug #3133. When some node don't exsit, there are some error msgs, and other nodes succeed. handle this case.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14135 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
61d079df0a
commit
d97f8338fa
@ -69,21 +69,42 @@ sub enumerate_lcds {
|
||||
my $power_status_prefix = "Current Power Status:";
|
||||
my $Rc;
|
||||
my @refcode;
|
||||
my $c;
|
||||
my $c = 0;
|
||||
|
||||
my $values = xCAT::FSPUtils::fsp_api_action ($request, $name, $d, $action);
|
||||
$Rc = @$values[2];
|
||||
my $data = @$values[1];
|
||||
my $t_n = @$values[0];
|
||||
if( $Rc != 0 ) {
|
||||
my @names = split(/,/, $name);
|
||||
my @t_data = split(/\n\n/, $data);
|
||||
my @names = split(/,/, $t_n);
|
||||
my @t_data = split(/\n/, $data);
|
||||
foreach my $n (@names) {
|
||||
if( $data =~ /$n/ ) {
|
||||
chomp $t_data[$c];
|
||||
push @refcode,[$n, "$prefix $t_data[$c]", $Rc];
|
||||
if( $only_lcds == 0) {
|
||||
push @refcode,[$n, "$power_status_prefix $t_data[$c]", $Rc];
|
||||
}
|
||||
#push @refcode,[$n, "$prefix $t_data[$c]", $Rc];
|
||||
if($t_data[$c] =~ /Error/ ) {
|
||||
if( $only_lcds == 0) {
|
||||
push @refcode,[$n, "$power_status_prefix $t_data[$c]", $Rc];
|
||||
}
|
||||
push @refcode,[$n, "$prefix $t_data[$c]", $Rc];
|
||||
} else {
|
||||
if( $only_lcds == 0) {
|
||||
|
||||
# get power status
|
||||
if( $data =~ /1\|/) {
|
||||
push @refcode, [$n, "$power_status_prefix on", $Rc] ;
|
||||
} else {
|
||||
push @refcode, [$n, "$power_status_prefix off", $Rc];
|
||||
}
|
||||
}
|
||||
|
||||
# get lcd value
|
||||
if( $t_data[$c] =~ /1\|(\w[\w\s]*)/) {
|
||||
push @refcode, [$n, "$prefix $1", $Rc] ;
|
||||
} else {
|
||||
push @refcode, [$n, "$prefix blank", $Rc];
|
||||
}
|
||||
}
|
||||
$c++;
|
||||
} else {
|
||||
push @refcode, [$n, "$prefix $data", $Rc];
|
||||
|
Loading…
Reference in New Issue
Block a user