summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-03-29 10:52:57 +0000
committerErmal <eri@pfsense.org>2010-03-29 10:52:57 +0000
commit92dd6a83f34de3e5a36c60f18f825fd5a70d614b (patch)
tree8f1d32ff829a2d05c843c82762a984e2b03f5088 /etc
parenta728d6f91e501a3e68e425841fa3895e4bb6915a (diff)
downloadpfsense-92dd6a83f34de3e5a36c60f18f825fd5a70d614b.zip
pfsense-92dd6a83f34de3e5a36c60f18f825fd5a70d614b.tar.gz
Make sure we do not error out and silence some errors.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 8bed47d..c98e746 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -43,7 +43,10 @@ function services_parse_dhcpd_hostnames() {
// Launch if option enabled
if (isset($config['dnsmasq']['regdhcp'])) {
- mwexec("/bin/ln /etc/hosts {$g['varetc_path']}/hosts");
+ /* Make sure we do not error out */
+ @touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases");
+ if (!file_exists("{$g['varetc_path']}/hosts"))
+ mwexec("/bin/ln /etc/hosts {$g['varetc_path']}/hosts");
if (file_exists("{$g['varrun_path']}/dhcpleases.pid"))
sigkillbypid("{$g['varrun_path']}/dhcpleases.pid", "HUP");
else
OpenPOWER on IntegriCloud