Bug 170735 - initscript exit status does not conform to LSB
Summary: initscript exit status does not conform to LSB
Keywords:
Status: CLOSED DUPLICATE of bug 151104
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-14 09:14 UTC by Trond Eivind Glomsrød
Modified: 2014-03-17 02:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-14 16:33:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ***


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