From bb9fb8c54b7d64060320afbfb1c34dee9a5dfe1e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 29 Nov 2012 21:55:41 +0000 Subject: [PATCH] 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 --- xCAT-server/lib/perl/xCAT/IMMUtils.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/IMMUtils.pm b/xCAT-server/lib/perl/xCAT/IMMUtils.pm index 741b5db26..1b72ef820 100644 --- a/xCAT-server/lib/perl/xCAT/IMMUtils.pm +++ b/xCAT-server/lib/perl/xCAT/IMMUtils.pm @@ -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,