Bug 522071 - Misbehaved rsyslog init script
Summary: Misbehaved rsyslog init script
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rsyslog
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Heinrich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject 539065
TreeView+ depends on / blocked
 
Reported: 2009-09-09 12:04 UTC by Eduard Benes
Modified: 2016-09-20 04:49 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
: 539065 (view as bug list)
Environment:
Last Closed: 2009-10-12 10:00:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eduard Benes 2009-09-09 12:04:58 UTC
Description of problem:
Testing init script according to guidelines at [1],[2] shows following results:

== 1 ==
Running start on a service already running sould return successful (0 value), and not 1 as it does now:
<snip>
# service rsyslog stop ; echo $?
Shutting down system logger: [  OK  ]
0
# service rsyslog start ; echo $?
Starting system logger: [  OK  ]
0
# service rsyslog start ; echo $?
Starting system logger: [FAILED]
1
</snip>

== 2 ==
Missing 'status' action in the usage text, e.g. run 'grep -i "usage.*status" /etc/rc.d/init.d/rsyslog' (Expected 0, got 1)

== 3 ==
Would be nice to add support for 'try-restart' as it is really just an alias for 'condrestart'.

== 4 ==
Does not use "common" lock file name. Uses rsyslog instead of $prog which is rsyslogd. Should use rather 'lockfile=/var/lock/subsys/$prog'. Please refer to [2]. And please, also note that is uses following pid file: "/var/run/syslogd.pid"

== 5 ==
Lock file handling issues. Status should return 2, not 3:
<snip>
# service rsyslog stop ; echo $?
Shutting down system logger: [  OK  ]
0
# touch /var/lock/subsys/rsyslog
# service rsyslog status ; echo $?
rsyslogd is stopped
3
----
:: [   PASS   ] :: Running 'service rsyslog status'
:: [   PASS   ] :: Running 'touch /var/lock/subsys/rsyslog'
:: [   FAIL   ] :: Running 'service rsyslog status' (Expected 2, got 3)
</snip>

PID file handling issues. Status should return 1, not 3:
<snip>
# service rsyslog stop ; echo $?
Shutting down system logger: [  OK  ]
0
# echo 123456 > /var/run/syslog.pid
# service rsyslog status ; echo $?
rsyslogd is stopped
3
----
:: [   PASS   ] :: Running 'service rsyslog stop'
:: [   PASS   ] :: Running 'echo 123456 > /var/run/rsyslog.pid'
:: [   FAIL   ] :: Running 'service rsyslog status' (Expected 1, got 3)
</snip>

== 6 == 
Bad exit code for unimplemented action. Running 'service rsyslog hello' should return 3, got 2.

Version-Release number of selected component (if applicable):
4.4.1-1.fc12.i686

Actual results:
Misbehaved init script.

Expected results:
be LSB compliant (see[1],[2],[3]).

Additional info:
[1] - https://fedoraproject.org/wiki/FCNewInit/Initscripts
[2] - https://fedoraproject.org/wiki/Packaging/SysVInitScript
[3] - http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

Comment 1 Tomas Heinrich 2009-09-14 18:30:41 UTC
New rsyslog build is in rawhide.
Note that rsyslog uses a non-standard pid file because of bug 441664.


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