Bug 237955 - Wrong init script
Summary: Wrong init script
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On: 237953
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-26 11:45 UTC by Michal Marciniszyn
Modified: 2014-02-10 23:02 UTC (History)
1 user (show)

Fixed In Version: 1.2.10-8.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-26 12:56:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Marciniszyn 2007-04-26 11:45:55 UTC
+++ 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
else
        exit 0
fi
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):
all

How reproducible:
always

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

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:
http://intranet.corp.redhat.com/ic/intranet/InitscriptsSpec.html
http://intranet.corp.redhat.com/ic/intranet/InitscriptGuidelines.html

For an example of the script that returns the error codes correctly and always
runs status see:
http://devserv.devel.redhat.com/~mmarcini/amd

This bug is tracked by 237789.


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