Red Hat Bugzilla – Bug 170735
initscript exit status does not conform to LSB
Last modified: 2014-03-16 22:56:29 EDT
According to the LSB, 'running "stop" on a service already stopped or not
running' is considered a successful action (and should thus return 0). When
running "service sendmail stop" (or invoking the init script directly) and
sendmail isn't running, it returns 1:
[root@delfi3-1 ~]# service sendmail stop
Shutting down sendmail: [FAILED]
[root@delfi3-1 ~]# echo $?
This is important to us as the init scripts not being LSB-compliant breaks the
Heartbeat HA (high availability) scripts.
I tracked this down to line 219 of /etc/rc.d/init.d/functions. The line
It either should be changed to
or else a more careful check to see if the service is already stopped should be
undertaken before returning error (1).
This is an initscripts problem, then.
The same stop mechanism is used in many init scripts.
*** This bug has been marked as a duplicate of 151104 ***