summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc8
-rwxr-xr-xetc/rc.initial.setlanip4
2 files changed, 7 insertions, 5 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index bd1e75b..6175a17 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -42,6 +42,10 @@ function services_dhcpd_configure() {
$mt = microtime();
echo "services_dhcpd_configure($if) being called $mt\n";
}
+
+ /* kill any running dhcpd */
+ if(is_process_running("dhcpd"))
+ mwexec("killall dhcpd", true);
/* DHCP enabled on any interfaces? */
if (!is_dhcp_server_enabled())
@@ -73,10 +77,6 @@ function services_dhcpd_configure() {
fclose($fd);
mwexec("/bin/sh /tmp/dhcpd.sh");
- /* kill any running dhcpd */
- if(is_process_running("dhcpd"))
- mwexec("killall dhcpd", true);
-
$syscfg = $config['system'];
$dhcpdcfg = $config['dhcpd'];
$Iflist = get_configured_interface_list();
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index bd536dd..34112a0 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -166,8 +166,10 @@
/* TODO - this line is causing a "Fatal error: Cannot unset
string offsets in /etc/rc.initial.setlanip" on below line
number */
- if($config['dhcpd'][$interface])
+ if($config['dhcpd'][$interface])
unset($config['dhcpd'][$interface]['enable']);
+
+ services_dhcpd_configure();
}
if ($config['system']['webgui']['protocol'] == "https") {
OpenPOWER on IntegriCloud