Bug 135532 - Bad exit codes for missing files in initscript
Bad exit codes for missing files in initscript
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: bind (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
Ben Levenson
Depends On:
  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:
Last Closed: 2004-10-18 17:03:55 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 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)

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):

How reproducible:

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