Bug 455682 - "service named stop" returns "OK" even when named is not running
"service named stop" returns "OK" even when named is not running
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: initscripts Maintenance Team
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-16 19:58 EDT by Murray McAllister
Modified: 2015-01-04 17:35 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-11 13:42:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Murray McAllister 2008-07-16 19:58:43 EDT
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 06:03:09 EDT
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 13:42:42 EDT
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.