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
New rsyslog build is in rawhide. Note that rsyslog uses a non-standard pid file because of bug 441664.