From 4ad34b45658ab762bdc96b271fde1a0abff1768c Mon Sep 17 00:00:00 2001 From: sakolish Date: Tue, 4 Mar 2008 20:00:50 +0000 Subject: [PATCH] Cleaned up error-handling (particularly for IVM) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@670 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPCboot.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/PPCboot.pm b/perl-xCAT-2.0/xCAT/PPCboot.pm index 655a7904a..7f85f878d 100644 --- a/perl-xCAT-2.0/xCAT/PPCboot.pm +++ b/perl-xCAT-2.0/xCAT/PPCboot.pm @@ -187,7 +187,7 @@ sub ivm_rnetboot { ####################################### # Network specified ####################################### - $cmd.= " -s auto -d auto -S $opt->{S} -G $opt->{G} -C $opt->{C}"; + $cmd.= " -s auto -d auto -m $opt->{m} -S $opt->{S} -G $opt->{G} -C $opt->{C}"; ####################################### # Add command options @@ -217,7 +217,14 @@ sub ivm_rnetboot { ####################################### # Get command exit code ####################################### - my $Rc = ( $? ) ? $? >> 8 : SUCCESS; + my $Rc = SUCCESS; + + foreach ( split /\n/, $result ) { + if ( /^lpar_netboot: / ) { + $Rc = RC_ERROR; + last; + } + } return( [$Rc,$result] ); } @@ -333,3 +340,4 @@ sub rnetboot { 1; +