Red Hat Bugzilla – Bug 237955
Wrong init script
Last modified: 2014-02-10 18:02:12 EST
+++ This bug was initially created as a clone of Bug #237953 +++
Description of problem:
Following code returns error code 0 when function script does not exist
irrespectively of status of the service.
if [ -f /etc/init.d/functions ] ; then
elif [ -f /etc/rc.d/init.d/functions ] ; then
There is also minor error in error code for unimplemented feature (1 instead of
3 at the end of the script).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. rename functions script
2. service cups start/status
3. echo $?
non-zero error code
When fixing this bug, please obbey our init script guidelines and be sure that
status command is run correctly.
Our guidelines are on following two pages:
For an example of the script that returns the error codes correctly and always
runs status see:
This bug is tracked by 237789.