Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 170735

Summary: initscript exit status does not conform to LSB
Product: Red Hat Enterprise Linux 4 Reporter: Trond Eivind Glomsrød <trondeg>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-14 16:33:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Trond Eivind Glomsrød 2005-10-14 09:14:03 UTC
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 $?
1
[root@delfi3-1 ~]#

Comment 1 bugzilla macrotex 2006-05-11 05:09:12 UTC
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 05:11:53 UTC
I tracked this down to line 219 of /etc/rc.d/init.d/functions. The line
currently reads 

RC=1

It either should be changed to 

RC=0

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 13:56:51 UTC
This is an initscripts problem, then.

The same stop mechanism is used in many init scripts.

Comment 4 Bill Nottingham 2006-07-14 16:33:03 UTC

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