Bug 98307 - Script errors in /etc/init.d/named, return value error in /usr/sbin/named
Summary: Script errors in /etc/init.d/named, return value error in /usr/sbin/named
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bind
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-30 20:57 UTC by Behdad Esfahbod
Modified: 2007-04-18 16:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-07-09 13:12:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Behdad Esfahbod 2003-06-30 20:57:20 UTC
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 13:12:00 UTC
Fixed in RawHide.


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