diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-10-07 14:44:54 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-10-07 14:44:54 -0300 |
commit | 86ce2df7fdb04aa15f9fbeda91202c153e9d0cbd (patch) | |
tree | 75857e7beca68cbcc4412fc91d20193fa8d1f921 | |
parent | a3cc8dcc600d105d73eb4729c32433d40d72cab7 (diff) | |
download | pfsense-86ce2df7fdb04aa15f9fbeda91202c153e9d0cbd.zip pfsense-86ce2df7fdb04aa15f9fbeda91202c153e9d0cbd.tar.gz |
Be more strict when checking if olsrd is enabled, otherwise when package is deinstalled and configuration is kept dhcpd will consider it's always as enabled
-rw-r--r-- | etc/inc/services.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 2f2fc83..79e205d 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -358,10 +358,14 @@ function services_dhcpdv4_configure() { return 0; /* if OLSRD is enabled, allow WAN to house DHCP. */ - if($config['installedpackages']['olsrd']) + if (!function_exists('is_package_installed')) + require_once('pkg-utils.inc'); + if (is_package_installed('olsrd') && isset($config['installedpackages']['olsrd'])) foreach($config['installedpackages']['olsrd']['config'] as $olsrd) - if($olsrd['enable']) - $is_olsr_enabled = true; + if (isset($olsrd['enable']) && $olsrd['enable'] == "on") { + $is_olsr_enabled = true; + break; + } if ($g['booting']) { /* restore the leases, if we have them */ |