summaryrefslogtreecommitdiffstats
path: root/dhcp_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'dhcp_wizard')
-rw-r--r--dhcp_wizard/scripts/Dhcpconf.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/dhcp_wizard/scripts/Dhcpconf.pm b/dhcp_wizard/scripts/Dhcpconf.pm
index 40c1bc5e..4cb9a21a 100644
--- a/dhcp_wizard/scripts/Dhcpconf.pm
+++ b/dhcp_wizard/scripts/Dhcpconf.pm
@@ -85,7 +85,7 @@ sub do_it {
#[ -f /etc/sysconfig/dhcpd ] && cp -f /etc/sysconfig/dhcpd /var/tmp/wiz_bck/orig/dhcpd
my $file = "/etc/sysconfig/dhcpd";
- MDK::Common::cp_af($file, $file.".orig");
+ -f $file and MDK::Common::cp_af($file, $file.".orig");
$file = "/etc/rc.d/init.d/dhcpd";
# now patching etc/rc.d/init.d/dhcpd
@@ -134,6 +134,11 @@ mask = $wiz_ip_netmask, rng1 = $wiz_ip_range1, rng2 = $wiz_ip_range2, dname = $w
standalone::explanations("$file: lease_file = $mdk{lease_file}, interfaces = $mdk{interfaces}");
Vareqval->commit($file, \%mdk);
}
+ !$ENV{wiz_authoritative} and output($file, map {
+ s|^\s*not\s*authoritative.*|\#$&|i;
+ $_;
+ } cat_ ("/etc/dhcpd.conf"));
+
system("/etc/rc.d/init.d/dhcpd restart");
10;
}