Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 521596 - wrong return code of init script
Summary: wrong return code of init script
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: squid
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jiri Skala
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 517000 InitScriptsProject
TreeView+ depends on / blocked
 
Reported: 2009-09-07 08:11 UTC by Milos Malik
Modified: 2014-11-09 22:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-15 17:57:25 UTC
Type: ---


Attachments (Terms of Use)

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.


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