Bug 455682 - "service named stop" returns "OK" even when named is not running
Summary: "service named stop" returns "OK" even when named is not running
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-16 23:58 UTC by Murray McAllister
Modified: 2015-01-04 22:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-03-11 17:42:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Murray McAllister 2008-07-16 23:58:43 UTC
Description of problem:

I'm not sure if this is a real issue...Running "service named stop" returns "OK"
even when named is not running.

Version-Release number of selected component (if applicable):

* Red Hat Enterprise Linux Client release 5.2 (Tikanga)
  bind-9.3.4-6.P1.el5
  bind-utils-9.3.4-6.P1.el5
  bind-libs-9.3.4-6.P1.el5


* Fedora release 9 (Sulphur)
  bind-9.5.0-33.P1.fc9.i386
  bind-utils-9.5.0-33.P1.fc9.i386
  bind-libs-9.5.0-33.P1.fc9.i386

How reproducible:

Always

Steps to Reproduce:

Run "service named stop". This returns "OK" even when named is not running.
Repeatedly running this always returns "OK".

I thought this should return "FAILED" like most other daemons for this situation.

Comment 1 Adam Tkac 2008-08-12 10:03:09 UTC
From my point of view when named doesn't run and you stop it script will return OK (because it is stopped). But it seems that other daemons return failure in this situation so I will fix named initscript in next update.

Comment 5 Bill Nottingham 2009-03-11 17:42:42 UTC
Re-reading:

http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

...

For all other init-script actions, the init script shall return an exit status of zero if the action was successful. Otherwise, the exit status shall be non-zero, as defined below. In addition to straightforward success, the following situations are also to be considered successful:

...
    * running stop on a service already stopped or not running

So, the behavior from the original report is actually correct.


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