summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-04-28 21:12:20 +0000
committerErmal <eri@pfsense.org>2014-04-28 21:12:38 +0000
commit66201c9617d1a8116f4b02eee4a8344b5795c217 (patch)
tree20111aa36ddaff05b2a29b3764a0b22510bf8df0
parent3f06e5383f1bef897b70daaae5305862d5755008 (diff)
downloadpfsense-66201c9617d1a8116f4b02eee4a8344b5795c217.zip
pfsense-66201c9617d1a8116f4b02eee4a8344b5795c217.tar.gz
Send HUP to restart syslogd rather than trying to restart it, thus loosing messages
-rw-r--r--etc/inc/system.inc17
1 files changed, 8 insertions, 9 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 9adfff1..7433d31 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -629,11 +629,7 @@ function system_syslogd_start() {
if ($g['booting'])
echo gettext("Starting syslog...");
- else
- killbypid("{$g['varrun_path']}/syslog.pid");
- if (is_process_running("syslogd"))
- mwexec('/bin/pkill syslogd');
if (is_process_running("fifolog_writer"))
mwexec('/bin/pkill fifolog_writer');
@@ -651,7 +647,8 @@ function system_syslogd_start() {
$log_size = isset($config['syslog']['logfilesize']) ? $config['syslog']['logfilesize'] : "10240";
$log_create_directive = "/usr/local/sbin/clog -i -s ";
}
-
+
+ $syslogd_extra = "";
if (isset($syslogcfg)) {
$separatelogfacilities = array('ntp','ntpd','ntpdate','charon','openvpn','pptps','poes','l2tps','relayd','hostapd','dnsmasq','filterdns','unbound','dhcpd','dhcrelay','dhclient','apinger','radvd','routed','olsrd','zebra','ospfd','bgpd','miniupnpd','filterlog');
$syslogconf = "";
@@ -802,12 +799,14 @@ EOD;
}
}
- $retval = mwexec_bg("/usr/sbin/syslogd -s -c -c -l {$g['dhcpd_chroot_path']}/var/run/log -f {$g['varetc_path']}/syslog.conf {$sourceip}");
-
- } else {
- $retval = mwexec_bg("/usr/sbin/syslogd -s -c -c -l {$g['dhcpd_chroot_path']}/var/run/log");
+ $syslogd_extra = "-f {$g['varetc_path']}/syslog.conf {$sourceip}";
}
+ if (isvalidpid("{$g['varrun_path']}/syslog.pid"))
+ sigkillbypid("{$g['varrun_path']}/syslog.pid", "HUP");
+ else
+ $retval = mwexec_bg("/usr/sbin/syslogd -s -c -c -l {$g['dhcpd_chroot_path']}/var/run/log -P {$g['varrun_path']}/syslog.pid {$syslogd_extra}");
+
if ($g['booting'])
echo gettext("done.") . "\n";
OpenPOWER on IntegriCloud