From 821ba4eae2c41f7c01d1c8a3f257d1c70045283e Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Mon, 20 Dec 2010 09:14:15 +0000 Subject: [PATCH] Fixed bug 3133969: getmacs/rneboot-> cannot handle error for rpower failure git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8473 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPboot.pm | 6 +++--- perl-xCAT/xCAT/FSPmac.pm | 4 ++-- perl-xCAT/xCAT/PPCboot.pm | 6 +++--- perl-xCAT/xCAT/PPCmac.pm | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/perl-xCAT/xCAT/FSPboot.pm b/perl-xCAT/xCAT/FSPboot.pm index 941586412..f206a84c0 100644 --- a/perl-xCAT/xCAT/FSPboot.pm +++ b/perl-xCAT/xCAT/FSPboot.pm @@ -144,7 +144,7 @@ sub do_rnetboot { ####################################### foreach ( split /\n/, $result ) { - if ( /^lpar_netboot: / ) { + if ( /^lpar_netboot / ) { $Rc = RC_ERROR; last; } @@ -348,7 +348,7 @@ sub rnetboot { # ################################## if ( $Rc != SUCCESS ) { - if ( @$result[0] =~ /lpar_netboot: (.*)/ ) { + if ( @$result[0] =~ /lpar_netboot (.*)/ ) { return( [[$node,$1,$Rc]] ); } return( [[$node,join( '', @$result ),$Rc]] ); @@ -388,7 +388,7 @@ sub rnetboot { # lpar_netboot: bootp operation failed. # ##################################### - if ( $data =~ /lpar_netboot: (.*)/ ) { + if ( $data =~ /lpar_netboot (.*)/ ) { return( [[$node,$1,RC_ERROR]] ); } return( [[$node,$data,RC_ERROR]] ); diff --git a/perl-xCAT/xCAT/FSPmac.pm b/perl-xCAT/xCAT/FSPmac.pm index e4abe6920..e5a673b59 100644 --- a/perl-xCAT/xCAT/FSPmac.pm +++ b/perl-xCAT/xCAT/FSPmac.pm @@ -154,7 +154,7 @@ sub do_getmacs { my $Rc = SUCCESS; foreach ( split /\n/, $result ) { - if ( /^lpar_netboot: / ) { + if ( /^lpar_netboot / ) { $Rc = RC_ERROR; last; } @@ -499,7 +499,7 @@ sub getmacs { # Return error ################################## if ( $Rc != SUCCESS ) { - if ( @$result[0] =~ /lpar_netboot: (.*)/ ) { + if ( @$result[0] =~ /lpar_netboot (.*)/ ) { return( [[$node,$1,$Rc]] ); } return( [[$node,join( '', @$result ),$Rc]] ); diff --git a/perl-xCAT/xCAT/PPCboot.pm b/perl-xCAT/xCAT/PPCboot.pm index 1164c2b5c..13f976bc3 100644 --- a/perl-xCAT/xCAT/PPCboot.pm +++ b/perl-xCAT/xCAT/PPCboot.pm @@ -277,7 +277,7 @@ sub do_rnetboot { ####################################### foreach ( split /\n/, $result ) { - if ( /^lpar_netboot: / ) { + if ( /^lpar_netboot / ) { $Rc = RC_ERROR; last; } @@ -495,7 +495,7 @@ sub rnetboot { # ################################## if ( $Rc != SUCCESS ) { - if ( @$result[0] =~ /lpar_netboot: (.*)/ ) { + if ( @$result[0] =~ /lpar_netboot (.*)/ ) { return( [[$node,$1,$Rc]] ); } return( [[$node,join( '', @$result ),$Rc]] ); @@ -535,7 +535,7 @@ sub rnetboot { # lpar_netboot: bootp operation failed. # ##################################### - if ( $data =~ /lpar_netboot: (.*)/ ) { + if ( $data =~ /lpar_netboot (.*)/ ) { return( [[$node,$1,RC_ERROR]] ); } return( [[$node,$data,RC_ERROR]] ); diff --git a/perl-xCAT/xCAT/PPCmac.pm b/perl-xCAT/xCAT/PPCmac.pm index 485330626..08fbd259f 100644 --- a/perl-xCAT/xCAT/PPCmac.pm +++ b/perl-xCAT/xCAT/PPCmac.pm @@ -367,7 +367,7 @@ sub do_getmacs { my $Rc = SUCCESS; foreach ( split /\n/, $result ) { - if ( /^lpar_netboot: / ) { + if ( /^lpar_netboot / ) { $Rc = RC_ERROR; last; } @@ -675,7 +675,7 @@ sub getmacs { # Return error ################################## if ( $Rc != SUCCESS ) { - if ( @$result[0] =~ /lpar_netboot: (.*)/ ) { + if ( @$result[0] =~ /lpar_netboot Status: (.*)/ ) { return( [[$node,$1,$Rc]] ); } return( [[$node,join( '', @$result ),$Rc]] );