Bug 521596

Summary: wrong return code of init script
Product: [Fedora] Fedora Reporter: Milos Malik <mmalik>
Component: squidAssignee: Jiri Skala <jskala>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: aglotov, henrik, jonathansteffan, jskala, mnagy
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-15 17:57:25 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:    
Bug Blocks: 517000, 521669    

Description Milos Malik 2009-09-07 08:11:52 UTC
Description of problem:

excerpt from https://fedoraproject.org/wiki/FCNewInit/Initscripts

... following situations are also to be considered successful:
    * restarting a service (instead of reloading it) with the force-reload argument
    * running start on a service already running
    * running stop on a service already stopped or not running
    * running restart on a service already stopped or not running
    * running try-restart on a service already stopped or not running 

Version-Release number of selected component (if applicable):
squid-3.0.STABLE13-1.fc11

How reproducible:
always

Steps to Reproduce:
# /etc/init.d/squid start
Starting squid: .[  OK  ]
# echo $?
0
# /etc/init.d/squid stop
Stopping squid: ................[  OK  ]
# echo $?
0
# /etc/init.d/squid stop
Stopping squid: [FAILED]
# echo $?
1
#
  
Actual results:
last exit code is 1

Expected results:
last exit code is 0

Additional info:

Comment 1 Milos Malik 2009-09-07 08:13:42 UTC
The same problem is visible when starting an already running service.

# /etc/init.d/squid start
Starting squid: .[  OK  ]
# echo $?
0
# /etc/init.d/squid start
Starting squid: [FAILED]
# echo $?
1
# 

Last exit code should be 0.

Comment 3 Milos Malik 2009-09-14 12:18:53 UTC
Please implement "force-reload" action.

excerpt from https://fedoraproject.org/wiki/FCNewInit/Initscripts

The start, stop, restart, force-reload, and status actions shall be supported by all init scripts; the reload and the try-restart actions are optional. Other init-script actions may be defined by the init script.