This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 237955 - Wrong init script
Wrong init script
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Tim Waugh
Depends On: 237953
  Show dependency treegraph
Reported: 2007-04-26 07:45 EDT by Michal Marciniszyn
Modified: 2014-02-10 18:02 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.2.10-8.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-26 08:56:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Marciniszyn 2007-04-26 07:45:55 EDT
+++ 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
        . /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
        . /etc/rc.d/init.d/functions
        exit 0
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):

How reproducible:

Steps to Reproduce:
1. rename functions script
2. service cups start/status
3. echo $?
Actual results:

Expected results:
non-zero error code

Additional info:
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.

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