From ffcf50f30df8b644f61ea1b52710a4e8f9e9fc98 Mon Sep 17 00:00:00 2001 From: sakolish Date: Wed, 5 Mar 2008 19:10:39 +0000 Subject: [PATCH] Return error code to be used for command exit code git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@691 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPCpower.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/PPCpower.pm b/perl-xCAT-2.0/xCAT/PPCpower.pm index 493f2c5b8..04aaa509d 100644 --- a/perl-xCAT-2.0/xCAT/PPCpower.pm +++ b/perl-xCAT-2.0/xCAT/PPCpower.pm @@ -182,14 +182,14 @@ sub powercmd_boot { # Output error ################################## if ( $Rc != SUCCESS ) { - push @output, [$name,$data]; + push @output, [$name,$data,$Rc]; next; } ################################## # Node not found ################################## if ( !exists( $data->{$name} )) { - push @output, [$name,"Node not found"]; + push @output, [$name,"Node not found",1]; next; } ################################## @@ -205,7 +205,7 @@ sub powercmd_boot { $exp, $op, $d ); - push @output, [$name,@$result[1]]; + push @output, [$name,@$result[1],@$result[0]]; } return( \@output ); } @@ -239,7 +239,7 @@ sub powercmd { ################################ # Return result ################################ - push @result, [$name,@$values[0]]; + push @result, [$name,@$values[0],$Rc]; } return( \@result ); } @@ -293,14 +293,14 @@ sub state { # Output error ################################## if ( $Rc != SUCCESS ) { - push @result, [$name, "$prefix$data"]; + push @result, [$name, "$prefix$data",$Rc]; next; } ################################## # Node not found ################################## if ( !exists( $data->{$name} )) { - push @result, [$name, $prefix."Node not found"]; + push @result, [$name, $prefix."Node not found",1]; next; } ################################## @@ -314,7 +314,7 @@ sub state { if ( defined( $convert )) { $value = power_status( $value ); } - push @result, [$name,"$prefix$value"]; + push @result, [$name,"$prefix$value",$Rc]; } } return( \@result ); @@ -323,3 +323,4 @@ sub state { 1; +