diff --git a/rc.syslog b/rc.syslog
index cafd12a..ab2cb6f 100644
--- a/rc.syslog
+++ b/rc.syslog
@@ -63,6 +63,7 @@ test -s /var/lock/subsys/syslogd && {
read -t 5 syslog_use < /var/lock/subsys/syslogd
}
test -z "$syslog_use" && syslog_use=${syslog_bin}
+syslog_use_pid="/var/run/${syslog_use##*\/}.pid"
#
# Do not translate symbol addresses for 2.6 kernel
@@ -96,9 +97,10 @@ case "$1" in
if test -s /var/run/klogd.pid ; then
killproc ${klog_bin}
fi
- if test -s ${syslog_pid} ; then
- killproc -p ${syslog_pid} ${syslog_use}
+ if test -s ${syslog_use_pid} ; then
+ killproc -p ${syslog_use_pid} ${syslog_use}
echo -n "Re-"
+ rm -f /var/lock/subsys/syslogd
fi
echo -n "Starting syslog services"
test -z "$KERNEL_LOGLEVEL" && KERNEL_LOGLEVEL=1
@@ -120,8 +122,8 @@ case "$1" in
test "$2" = "early" && exit 0
echo -n "Shutting down syslog services"
- killproc -TERM ${klog_bin} ; rc_status
- killproc -p ${syslog_pid} -TERM ${syslog_use} ; rc_status -v
+ killproc -TERM ${klog_bin} ; rc_status
+ killproc -p ${syslog_use_pid} -TERM ${syslog_use} ; rc_status -v
rm -f /var/lock/subsys/syslogd
;;
try-restart|condrestart)
@@ -143,18 +145,22 @@ case "$1" in
;;
reload|force-reload)
echo -n "Reload syslog service"
- killproc -TSTP ${klog_bin} ; rc_status
- killproc -p ${syslog_pid} -HUP ${syslog_use} ; rc_status
- killproc -CONT ${klog_bin} ; rc_status
- killproc -USR2 ${klog_bin} ; rc_status -v
+ killproc -TSTP ${klog_bin} ; rc_status
+ killproc -p ${syslog_use_pid} -HUP ${syslog_use} ; rc_status
+ killproc -CONT ${klog_bin} ; rc_status
+ killproc -USR2 ${klog_bin} ; rc_status -v
;;
status)
echo -n "Checking for service syslog:"
checkproc ${klog_bin} ; rc_status
- checkproc -p ${syslog_pid} ${syslog_use} ; rc_status -v
+ checkproc -p ${syslog_use_pid} ${syslog_use} ; rc_status -v
;;
probe)
- test ${config} -nt ${syslog_pid} && echo reload
+ if test "${syslog_use_pid}" != "${syslog_pid}" ; then
+ echo restart
+ else
+ test ${config} -nt ${syslog_pid} && echo reload
+ fi
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
diff --git a/syslog.xml b/syslog.xml
index aef8d24..c053325 100644
--- a/syslog.xml
+++ b/syslog.xml
@@ -75,6 +75,11 @@ file extension.
/sbin/syslog-ng
+
+ syslogd
+ /sbin/syslogd
+
+