diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2016-10-30 00:03:38 +0200 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2016-11-02 19:48:15 +0100 |
commit | 4406922edb1000ef79f4fccfb484aa1103105ac0 (patch) | |
tree | 1f65a637c48a5618e794f6219cf73e320141391e | |
parent | 393c13179f4a0ff339a5ab81d07083eb5e2944fa (diff) | |
download | pfsense-4406922edb1000ef79f4fccfb484aa1103105ac0.zip pfsense-4406922edb1000ef79f4fccfb484aa1103105ac0.tar.gz |
syslogd, create configured logsocket directories
-rw-r--r-- | src/etc/inc/system.inc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 8d4f406..d6933b1 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1018,11 +1018,6 @@ EOD; } unset($syslogconf); - // Ensure that the log directory exists - if (!is_dir("{$g['dhcpd_chroot_path']}/var/run")) { - exec("/bin/mkdir -p {$g['dhcpd_chroot_path']}/var/run"); - } - $sourceip = ""; if (!empty($syslogcfg['sourceip'])) { if ($syslogcfg['ipproto'] == "ipv6") { @@ -1049,14 +1044,17 @@ EOD; if (isset($config['installedpackages']['package'])) { foreach ($config['installedpackages']['package'] as $package) { if (isset($package['logging']['logsocket']) && $package['logging']['logsocket'] != '' && - is_dir(dirname($package['logging']['logsocket'])) && !in_array($package['logging']['logsocket'], $log_sockets)) { $log_sockets[] = $package['logging']['logsocket']; } } } + $syslogd_sockets = ""; foreach ($log_sockets as $log_socket) { + // Ensure that the log directory exists + $logpath = dirname($log_socket); + safe_mkdir($logpath); $syslogd_sockets .= " -l {$log_socket}"; } |