diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-12-18 14:57:42 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-12-18 14:57:42 -0500 |
commit | 42ee8bde8b3eaf041a8c3303c4bc71f612e25a53 (patch) | |
tree | 54f50740f46962d8acb8caf8d5384429cf806986 /etc/inc/system.inc | |
parent | d64fa7f25478b66da1f17222f0a7fc5da080295b (diff) | |
download | pfsense-42ee8bde8b3eaf041a8c3303c4bc71f612e25a53.zip pfsense-42ee8bde8b3eaf041a8c3303c4bc71f612e25a53.tar.gz |
Ensure log directory exists before invoking syslogd
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 5 |
1 files changed, 5 insertions, 0 deletions
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"); |