Bug 135532 - Bad exit codes for missing files in initscript
Bad exit codes for missing files in initscript
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: bind (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-13 06:51 EDT by Berthold Cogel
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: bind-9.2.4-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-18 17:03:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Berthold Cogel 2004-10-13 06:51:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.2)
Gecko/20040806

Description of problem:
The initscript /etc/rc.d/init.d/named contains the following checks:

[ "${NETWORKING}" = "no" ] && exit 0
[ -x /usr/sbin/named ] || exit 0 
[ -r ${ROOTDIR}/etc/named.conf ] || exit 0 

Each of these should return '1' to indicate a failure.

If, for example, named is started by the cluster manager and you
forgot to provide a configuration, named is reported as started and
running, even if it is not. 

Version-Release number of selected component (if applicable):
bind-9.2.4-EL3_10

How reproducible:
Always

Steps to Reproduce:
1.delete /etc/named.conf
2.service named start/status
3.echo $?
    

Actual Results:  Gives '0'

Expected Results:  Should be '1'

Additional info:
Comment 1 Jason Vas Dias 2004-10-13 10:40:10 EDT
OK, in the next version, these checks will return 1 to indicate 
failure. 
These lines have remained unchanged since the very first version 
of named.init .
I guess the rationale behind them is that the bind rpm install
script always does a 'chkconfig --add named' on a clean install, and
that if NETWORKING is disabled or named is not configured, the service
is "disabled" and should not report errors on start up.
This will be fixed in bind-9.2.4-2_EL3 .



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