From 01a2faec3aabceb4d22a1273b19fa62944a06a7b Mon Sep 17 00:00:00 2001 From: sakolish Date: Wed, 5 Mar 2008 19:05:09 +0000 Subject: [PATCH] Return non-zero on error for comamnd exit code git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@690 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPCinv.pm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/PPCinv.pm b/perl-xCAT-2.0/xCAT/PPCinv.pm index 39d8f381a..acef8a4ad 100644 --- a/perl-xCAT-2.0/xCAT/PPCinv.pm +++ b/perl-xCAT-2.0/xCAT/PPCinv.pm @@ -362,14 +362,14 @@ sub bus { # Output error ################################# if ( $Rc != SUCCESS ) { - push @result, [$name,@$bus[0]]; + push @result, [$name,@$bus[0],$Rc]; next; } ################################# # Node not found ################################# if ( !exists( $data->{$name} )) { - push @result, [$name,"Node not found"]; + push @result, [$name,"Node not found",1]; next; } ################################# @@ -377,7 +377,7 @@ sub bus { ################################# foreach ( @{$data->{$name}} ) { s/,/:/; - push @result, [$name,$_]; + push @result, [$name,$_,$Rc]; } } } @@ -422,14 +422,14 @@ sub vpd { # Output error ############################# if ( $Rc != SUCCESS ) { - push @result, [$name,"@{$prefix{$_}}[0]: @$vpd[0]"]; + push @result, [$name,"@{$prefix{$_}}[0]: @$vpd[0]",$Rc]; next; } ############################# # Output value ############################# my $value = "@{$prefix{$_}}[0]: $data->{$_}"; - push @result, [$name,$value]; + push @result, [$name,$value,$Rc]; } } } @@ -473,21 +473,21 @@ sub config { ############################# if ( $Rc != SUCCESS ) { my $value = sprintf( "$_", $data ); - push @result, [$name,$value]; + push @result, [$name,$value,$Rc]; next; } ############################# # Node not found ############################# if (!exists( $data->{$name} )) { - push @result, [$name,"Node not found"]; + push @result, [$name,"Node not found",1]; next; } ############################# # Output value ############################# my $value = sprintf( $_, @{$data->{$name}}[$i++] ); - push @result, [$name,$value]; + push @result, [$name,$value,$Rc]; } } } @@ -525,3 +525,4 @@ sub all { 1; +