summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-08-12 14:00:10 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-08-12 14:00:25 -0400
commit1dcba27ccb70b7fc8952b597a99789ede16a84c8 (patch)
tree0a93bf268c33d324827cdb1fb35b96636e431a4c
parentcaea0c4756bd0ae8f28a60c54f33470d64054ba6 (diff)
downloadpfsense-1dcba27ccb70b7fc8952b597a99789ede16a84c8.zip
pfsense-1dcba27ccb70b7fc8952b597a99789ede16a84c8.tar.gz
Really restart DHCPD server after changes
-rwxr-xr-xetc/rc.initial.setlanip12
1 files changed, 9 insertions, 3 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index 34112a0..24497bf 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -106,6 +106,7 @@
$intip = "dhcp";
$intbits = "";
$isintdhcp = true;
+ $restart_dhcpd = true;
}
}
@@ -121,11 +122,11 @@
echo "e.g. 255.255.255.0 = 24\n";
echo " 255.255.0.0 = 16\n";
echo " 255.0.0.0 = 8\n";
-
do {
$upperifname = strtoupper($interface);
echo "\n" . gettext("Enter the new {$upperifname} IPv4 subnet bit count:") . "\n> ";
$intbits = chop(fgets($fp));
+ $restart_dhcpd = true;
} while (!is_numeric($intbits) || ($intbits < 1) || ($intbits > 31));
}
}
@@ -158,7 +159,7 @@
exit(0);
}
} while (!(is_ipaddr($dhcpendip)));
-
+ $restart_dhcpd = true;
$config['dhcpd'][$interface]['enable'] = true;
$config['dhcpd'][$interface]['range']['from'] = $dhcpstartip;
$config['dhcpd'][$interface]['range']['to'] = $dhcpendip;
@@ -168,8 +169,9 @@
number */
if($config['dhcpd'][$interface])
unset($config['dhcpd'][$interface]['enable']);
-
+ echo "Disabling DHCPD...";
services_dhcpd_configure();
+ echo "Done!\n";
}
if ($config['system']['webgui']['protocol'] == "https") {
@@ -213,6 +215,10 @@
echo " Reloading filter...";
filter_configure_sync();
echo "\n";
+ if($restart_dhcpd) {
+ echo " DHCPD...";
+ services_dhcpd_configure();
+ }
if ($intip != '') {
if (is_ipaddr($intip)) {
OpenPOWER on IntegriCloud