Red Hat Bugzilla – Bug 455682
"service named stop" returns "OK" even when named is not running
Last modified: 2015-01-04 17:35:26 EST
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)
* Fedora release 9 (Sulphur)
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.
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.
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.