Bug 243507

Summary: /etc/init.d/syslog reload is broken
Product: [Fedora] Fedora Reporter: Tobias Oed <tobiasoed>
Component: sysklogdAssignee: Peter Vrabec <pvrabec>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: low    
Version: 7   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.4.2-9.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-03 02:40:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Tobias Oed 2007-06-09 08:54:34 UTC
Description of problem:
/etc/init.d/syslog reload is broken if the syslogd/klogd lock files are missing

Version-Release number of selected component (if applicable):
sysklogd-1.4.2-5.fc7

How reproducible:
100 %

Steps to Reproduce:
1. service syslogd stop
2. service syslogd reload

Actual results:
Get ugly errors:

root@tobsbox:/etc/init.d# service syslog stop
Shutting down kernel logger:                               [  OK  ]
Shutting down system logger:                               [  OK  ]
root@tobsbox:/etc/init.d# service syslog reload
Reloading syslogd...kill: usage: kill [-s sigspec | -n signum | -sigspec] pid |
jobspec ... or kill -l [sigspec]
/etc/init.d/syslog: line 78: fail: command not found

Reloading klogd...kill: usage: kill [-s sigspec | -n signum | -sigspec] pid |
jobspec ... or kill -l [sigspec]
/etc/init.d/syslog: line 91: fail: command not found

Expected results:
Get a nice warning

Additional info:
Patch to fix this

--- syslog.orig 2007-06-09 10:41:17.000000000 +0200
+++ syslog      2007-06-09 10:32:30.000000000 +0200
@@ -70,12 +70,12 @@
     RETVAL=1
     syslog=`cat /var/run/syslogd.pid 2>/dev/null`
     echo -n "Reloading syslogd..."
-    if [ -n ${syslog} ] && [ -e /proc/${syslog} ]; then
-       kill -HUP $syslog;
+    if [ -n "${syslog}" ] && [ -e /proc/"${syslogd}" ]; then
+       kill -HUP "$syslog";
        RETVAL=$?
     fi
     if [ $RETVAL -ne 0 ]; then
-       fail
+       failure
     else
        success
     fi
@@ -83,12 +83,12 @@
     RETVAL=1
     echo -n "Reloading klogd..."
     klog=`cat /var/run/klogd.pid 2>/dev/null`
-    if [ -n ${klog} ] && [ -e /proc/${klog} ]; then
-       kill -USR2 $klog;
+    if [ -n "${klog}" ] && [ -e /proc/"${klog}" ]; then
+       kill -USR2 "$klog";
         RETVAL=$?
     fi
     if [ $RETVAL -ne 0 ]; then
-       fail
+       failure
     else
        success
     fi

Comment 1 Peter Vrabec 2007-06-11 11:57:07 UTC
thnx. for patch,
problem is fixed in sysklogd-1.4.2-9_fc{7,8}.


Comment 2 Fedora Update System 2007-06-11 22:03:34 UTC
sysklogd-1.4.2-9.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2007-08-03 02:40:50 UTC
sysklogd-1.4.2-9.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.