Bug 170735 - initscript exit status does not conform to LSB
initscript exit status does not conform to LSB
Status: CLOSED DUPLICATE of bug 151104
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2005-10-14 05:14 EDT by Trond Eivind Glomsrød
Modified: 2014-03-16 22:56 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-14 12:33:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Trond Eivind Glomsrød 2005-10-14 05:14:03 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 $?
[root@delfi3-1 ~]#
Comment 1 bugzilla macrotex 2006-05-11 01:09:12 EDT
This is important to us as the init scripts not being LSB-compliant breaks the
Heartbeat HA (high availability) scripts. 
Comment 2 bugzilla macrotex 2006-05-11 01:11:53 EDT
I tracked this down to line 219 of /etc/rc.d/init.d/functions. The line
currently reads 


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).
Comment 3 Thomas Woerner 2006-07-14 09:56:51 EDT
This is an initscripts problem, then.

The same stop mechanism is used in many init scripts.
Comment 4 Bill Nottingham 2006-07-14 12:33:03 EDT

*** This bug has been marked as a duplicate of 151104 ***

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