In case caller does not specify 'curraddr', fall back to ssh to the actual ip (e.g. remoteimmsetup case)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14487 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-11-29 21:55:41 +00:00
parent 31551bab47
commit bb9fb8c54b

View File

@ -52,8 +52,10 @@ sub setupIMM {
return;
}
my $targips;
my $sship = $args{curraddr};
if (scalar(@ips)) {
$targips = join(',',@ips);
unless ($sship) { $sship = $ips[0]; }
} elsif ($autolla) {
$targips=$args{curraddr};
}
@ -65,7 +67,7 @@ sub setupIMM {
#ok, with all ip addresses in hand, time to enable IPMI and set all the ip addresses (still static only, TODO: dhcp
my $ssh = new xCAT::SSHInteract(-username=>$args{cliusername},
-password=>$args{clipassword},
-host=>$args{curraddr},
-host=>$sship,
-nokeycheck=>1,
-output_record_separator=>"\r",
Timeout=>15,