Bug 135532 - Bad exit codes for missing files in initscript
Summary: Bad exit codes for missing files in initscript
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: bind
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-13 10:51 UTC by Berthold Cogel
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: bind-9.2.4-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-18 21:03:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Berthold Cogel 2004-10-13 10:51:47 UTC
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 14:40:10 UTC
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.