Stop restarting dhcpd on merely adding a NIC. If a NIC is v4 or v6 only, it

is going to be reaped as an empty entry anyway.
Rely on flag being set in addnet, which would be the place of substance
to know if (and which) dhcp service needs restarting


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9450 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-05-01 13:29:32 +00:00
parent c3982e0e44
commit 61e8a4ec3a

View File

@ -1361,6 +1361,7 @@ sub addnet6
if (grep /\} # $net subnet_end/,@dhcp6conf) { #need to add to dhcp6conf
return;
} else { #need to add to dhcp6conf
$restartdhcp6=1;
while ($idx <= $#dhcp6conf)
{
if ($dhcp6conf[$idx] =~ /\} # $iface nic_end/) {
@ -1784,8 +1785,8 @@ sub addnic
my $lastindex = 0;
unless (grep /} # $nic nic_end/, @$conf)
{ #add a section if not there
$restartdhcp=1;
print "Adding NIC $nic\n";
#$restartdhcp=1;
#print "Adding NIC $nic\n";
if ($nic =~ /!remote!/) {
push @$conf, "#shared-network $nic {\n";
push @$conf, "#\} # $nic nic_end\n";