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
This commit is contained in:
parent
7a144eb755
commit
01a2faec3a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user