Bug 243507 - /etc/init.d/syslog reload is broken
/etc/init.d/syslog reload is broken
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: sysklogd (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Peter Vrabec
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-09 04:54 EDT by Tobias Oed
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 1.4.2-9.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-02 22:40:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Tobias Oed 2007-06-09 04:54:34 EDT
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 07:57:07 EDT
thnx. for patch,
problem is fixed in sysklogd-1.4.2-9_fc{7,8}.
Comment 2 Fedora Update System 2007-06-11 18:03:34 EDT
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-02 22:40:50 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.