Bug 243507 - /etc/init.d/syslog reload is broken
Summary: /etc/init.d/syslog reload is broken
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sysklogd (Show other bugs)
(Show other bugs)
Version: 7
Hardware: All Linux
low
low
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-09 08:54 UTC by Tobias Oed
Modified: 2007-11-30 22:12 UTC (History)
0 users

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: ---


Attachments (Terms of Use)

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.


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