diff --git a/perl-xCAT/xCAT/FSPboot.pm b/perl-xCAT/xCAT/FSPboot.pm index 190a1d4db..bff368d26 100644 --- a/perl-xCAT/xCAT/FSPboot.pm +++ b/perl-xCAT/xCAT/FSPboot.pm @@ -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 ####################################### diff --git a/perl-xCAT/xCAT/PPCboot.pm b/perl-xCAT/xCAT/PPCboot.pm index cd2f3df64..5fb3d923a 100644 --- a/perl-xCAT/xCAT/PPCboot.pm +++ b/perl-xCAT/xCAT/PPCboot.pm @@ -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 #######################################