From 61e8a4ec3ace78e03eb8800d88d1447c711fd767 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sun, 1 May 2011 13:29:32 +0000 Subject: [PATCH] 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 --- xCAT-server/lib/xcat/plugins/dhcp.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 775ab9d0e..224e882e4 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -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";