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
This commit is contained in:
jbjohnso 2012-05-19 21:47:28 +00:00
parent 5ac7ac26c4
commit 996a3999d0

View File

@ -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);
}
}