Bug 237955

Summary: Wrong init script
Product: [Fedora] Fedora Reporter: Michal Marciniszyn <mmarcini>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: tvujec
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.2.10-8.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-26 12:56:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 237953    
Bug Blocks:    

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.