Red Hat Bugzilla – Bug 58815
RETVAL is not set correctly in all /etc/init.d/* scripts
Last modified: 2014-03-16 22:25:09 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:0.9.4)
Description of problem:
When using the 'status' parameter in the scripts in /etc/init.d/ directory, the
variable RETVAL is not set correctly.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. look at for example at /etc/init.d/httpd
2. when the 'status' parameter is passed to the script, this lines
3. the RETVAL variable is not set. The solution is:
Expected Results: It is expected that the RETVAL variable is set corecctly with
all the parameters passed to the script.
Sometimes you need to know the status of a service in a script with something
service httpd status
but not always you get exact RETVAL value when using the 'status' parameter.
The proposed solution is needed for final fixing but it is not enough: some
scripts have "exit 0" in the last line, not "exit $RETVAL". In skipjack2, those
(Those can be checked by: cd /etc/init.d && grep "^exit 0" * )
Closing bugs on older, no longer supported, releases. Apologies for any lack of
If this persists on a current release, such as Fedora Core 4, please open a new
bug. Note that these bugs really need to be filed against the individual
packages that contain such scripts.
ok, will do