summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/services.inc1
-rw-r--r--etc/inc/system.inc5
2 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index ba52ee9..166390b 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -73,7 +73,6 @@ function services_dhcpd_configure() {
fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/usr/local/sbin\n");
fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/var/db\n");
fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/var/run\n");
- fwrite($fd, "touch {$g['dhcpd_chroot_path']}/var/run/log\n");
fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/usr\n");
fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/lib\n");
fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/run\n");
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 9b07258..638cd6c 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -613,6 +613,11 @@ EOD;
}
fwrite($fd, $syslogconf);
fclose($fd);
+
+ // Ensure that the log directory exists
+ if(!isdir("{$g['dhcpd_chroot_path']}/var/run"))
+ exec("/bin/mkdir -p {$g['dhcpd_chroot_path']}/var/run");
+
// Are we logging to a least one remote server ?
if(strpos($syslogconf, "@") != false)
$retval = system("/usr/sbin/syslogd -c -c -l /var/dhcpd/var/run/log -f {$g['varetc_path']}/syslog.conf");
OpenPOWER on IntegriCloud