From 996a3999d02a00f550a577df565a8212e9acbca9 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 19 May 2012 21:47:28 +0000 Subject: [PATCH] Add subnet mask and gateway setup that was missing previously git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12829 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/slpdiscover.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/slpdiscover.pm b/xCAT-server/lib/xcat/plugins/slpdiscover.pm index a3446d880..872710daf 100644 --- a/xCAT-server/lib/xcat/plugins/slpdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/slpdiscover.pm @@ -5,6 +5,7 @@ use xCAT::SLP; use xCAT::NetworkUtils; use xCAT::SSHInteract; use xCAT::MacMap; +use xCAT_plugin::bmcconfig; my $defaultbladeuser; my $defaultbladepass; my $mpahash; @@ -193,7 +194,8 @@ sub setupIMM { if ($ip =~ /:/) { $ssh->cmd("ifconfig eth0 -ipv6static enable -i6 $ip"); } else { - $ssh->cmd("ifconfig eth0 -c static -i $ip"); + (my $sip,my $mask,my $gw) = xCAT_plugin::bmcconfig::net_parms($ip); + $ssh->cmd("ifconfig eth0 -c static -i $ip -s $mask -g $gw"); } } $ssh->close(); @@ -216,8 +218,9 @@ sub configure_hosted_elements { if ($addr =~ /^fe80/) { #Link local address requires scope index $addr .= "%".$immdata->{scopeid}; } - if ($doneaddrs{$addr}) { next; } - $doneaddrs{$addr}=1; + if ($doneaddrs{$node}) { next; } + $doneaddrs{$node}=1; + sendmsg(":Configuration of ".$node." commencing, configuration may take a few minutes to take effect",$callback); setupIMM($node,slpdata=>$immdata,curraddr=>$addr,username=>$user,password=>$pass); } }