Bug 98307 - Script errors in /etc/init.d/named, return value error in /usr/sbin/named
Script errors in /etc/init.d/named, return value error in /usr/sbin/named
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: bind (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-30 16:57 EDT by Behdad Esfahbod
Modified: 2007-04-18 12:55 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-09 09:12:00 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 Behdad Esfahbod 2003-06-30 16:57:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Starting named lacks a final newline.  Also stopping it does not write the
success or failure note.

I fixed this by adding a final "echo" in the start() function:

         daemon /usr/sbin/named -u named ${OPTIONS}
         RETVAL=$?
+        echo
         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/named
         return $RETVAL

and in stop():

         # Stop daemons.
         echo -n $"Stopping $prog: "
-        /usr/sbin/rndc stop
+        /usr/sbin/rndc stop && success $"$base shutdown" || failure $"$base
shutdown"
  
         RETVAL=$?

Another thing, starting named always writes success even if the server failed to
start.  This is because /usr/sbin/named always returns 0, that should be fixed.

Version-Release number of selected component (if applicable):
bind-9.2.1-16

How reproducible:
Always

Steps to Reproduce:
For the first bug:
1. service named restart
For the second:
1. Corrupt your /etc/named.conf
2. service named start

Actual Results:  First bug:
[root@shalil root]# service named restart
Stopping named:
[root@shalil root]#                                        [  OK  ]
Second bug:
It writes OK.

Expected Results:  First bug:
[root@gilas root]# service named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
[root@gilas root]#
Second bug:
It should fail.

Additional info:
Comment 1 Daniel Walsh 2003-07-09 09:12:00 EDT
Fixed in RawHide.

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