summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-11-03 15:27:32 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-11-03 15:27:32 -0200
commitf384d8a5d7fd54b5477ca770965bb4dda5390a4c (patch)
tree4b843b25228a70a353d1ad3eff984af7a8ef43dd
parentec2904649fac23c5155e779ebf3a266c94125c5f (diff)
parenta3fad5924362ade93f2e4710def540dcd0da94e7 (diff)
downloadpfsense-f384d8a5d7fd54b5477ca770965bb4dda5390a4c.zip
pfsense-f384d8a5d7fd54b5477ca770965bb4dda5390a4c.tar.gz
Merge pull request #1329 from phil-davis/patch-3
-rwxr-xr-xetc/rc.initial.setlanip13
1 files changed, 4 insertions, 9 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index 0ab10d4..49c70e2 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -395,16 +395,11 @@ function console_configure_dhcpd($version = 4) {
$config[$dhcpd][$interface]['range']['from'] = $dhcpstartip;
$config[$dhcpd][$interface]['range']['to'] = $dhcpendip;
} else {
- /* 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(isset($config[$dhcpd][$interface]['enable'])) {
unset($config[$dhcpd][$interface]['enable']);
- echo "Disabling DHCPD...";
- if (!$dry_run) {
- services_dhcpd_configure();
+ printf(gettext("Disabling %s DHCPD..."), $label_IPvX);
+ $restart_dhcpd = true;
}
- echo "Done!\n";
}
}
@@ -454,7 +449,7 @@ if(!$config['interfaces']['lan']) {
unset($config['nat']);
if (!$dry_run) {
system("rm /var/dhcpd/var/db/* >/dev/null 2>/dev/null");
- services_dhcpd_configure();
+ $restart_dhcpd = true;
}
}
OpenPOWER on IntegriCloud