Fixed one issue that in the case of first boot try failed, and second boot try succeed, rnetboot still returns the first try's error. If second try succeed, it means rnetboot succeed, it should return success.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10393 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2011-08-30 12:17:23 +00:00
parent cb9f712d6e
commit f17d4135ca
2 changed files with 9 additions and 5 deletions

View File

@ -31,8 +31,9 @@ sub do_rnetboot {
my $ssh = @$exp[0];
my $userid = @$exp[4];
my $pw = @$exp[5];
my $result = "";
my $Rc = SUCCESS;
my $cmd;
my $result;
#######################################
# Disconnect Expect session
@ -121,8 +122,9 @@ sub do_rnetboot {
$cmd.= " -f \"$name\" \"$pprofile\" \"$fsp\" $id $hcp \"$node\"";
print "cmd: $cmd\n";
my $done = 0;
my $Rc = SUCCESS;
while ( $done < 2 ) {
$result = "";
$Rc = SUCCESS;
#######################################
# Execute command
#######################################

View File

@ -107,9 +107,10 @@ sub do_rnetboot {
my $ssh = @$exp[0];
my $userid = @$exp[4];
my $pw = @$exp[5];
my $subreq = $request->{subreq};
my $subreq = $request->{subreq};
my $Rc = SUCCESS;
my $result = "";
my $cmd;
my $result;
#######################################
# Disconnect Expect session
@ -181,7 +182,6 @@ sub do_rnetboot {
$cmd.= " -o";
}
my $Rc = SUCCESS;
my @macs = split /,/, $opt->{m};
foreach my $mac ( @macs ) {
#######################################
@ -259,6 +259,8 @@ sub do_rnetboot {
my $done = 0;
while ( $done < 2 ) {
$result = "";
$Rc = SUCCESS;
#######################################
# Execute command
#######################################