diff options
author | doktornotor <notordoktor@gmail.com> | 2017-02-22 01:00:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-22 01:00:37 +0100 |
commit | 3d8b01e8c6392b4177572d540c8160c7e6e071ca (patch) | |
tree | 698e6b5022ba20b354f77e0532206821f37c958f /src | |
parent | aba748830d69b05df8c4a4cee370413c91c32273 (diff) | |
download | pfsense-3d8b01e8c6392b4177572d540c8160c7e6e071ca.zip pfsense-3d8b01e8c6392b4177572d540c8160c7e6e071ca.tar.gz |
Only start dhcpleases if DHCP server is enabled (Bug #6750)
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/system.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 028583b..61b6a77 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -570,12 +570,15 @@ function system_hosts_generate() { function system_dhcpleases_configure() { global $config, $g; - + if (!function_exists('is_dhcp_server_enabled')) { + require_once('pfsense-utils.inc'); + } $pidfile = "{$g['varrun_path']}/dhcpleases.pid"; /* Start the monitoring process for dynamic dhcpclients. */ - if ((isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcp'])) || - (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcp']))) { + if (((isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcp'])) || + (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcp']))) && + (is_dhcp_server_enabled())) { /* Make sure we do not error out */ mwexec("/bin/mkdir -p {$g['dhcpd_chroot_path']}/var/db"); if (!file_exists("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases")) { |