Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 102135

Summary: init-script for named/bind 9.3.1-r3 asks for options
Product: Gentoo Linux Reporter: Christian <benke>
Component: [OLD] ServerAssignee: Konstantin Arkhipov (RETIRED) <voxus>
Status: RESOLVED FIXED    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 107724    
Bug Blocks:    
Attachments: /etc/conf.d/named
working init-script

Description Christian 2005-08-11 09:55:29 UTC
i've had this bug with 9.2.5-r5 as well. trying to run /etc/init.d/named fails with

/etc/init.d/named start
 * Caching service dependencies ...                                            
                                      [ ok ] * Starting chrooted named ...
usage: named [-4|-6] [-c conffile] [-d debuglevel] [-f|-g] [-n number_of_cpus]
             [-p port] [-s] [-t chrootdir] [-u username]
             [-m {usage|trace|record}]
named: extra command line arguments            [!!]

although it is no problem to start it manually with "/usr/sbin/named -u named -t
/chroot/dns" resp. with "-d 9 -f -g" for debugging-output. the server-config
works(i file this report with the help of the manually started ns). the
init-scripts is a freshly installed default.
all my files reside in /chroot/dns.





Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Christian 2005-08-11 09:58:40 UTC
Created attachment 65678 [details]
/etc/conf.d/named

this is my /etc/conf.d/named - when the chroot-path is set, the
init.d/named-script starts with * Starting chrooted named ..., when it's
commented out it says * Starting named ... - so basically it is read...
Comment 2 Christian 2005-08-11 10:48:41 UTC
Created attachment 65682 [details]
working init-script

works with this init-script, seems there are probs with --pid/--pidfile
Comment 3 Andy Task 2005-09-02 02:31:13 UTC
I had the same issue.

In the /etc/init.d/named script replace the following lines 
-----------------------------------------------------------
# As with the named.conf test, above, there's no need
	# for chroot and non-chroot cases here
	 PIDFILE=$(grep "pid-file" ${CHROOT}/etc/bind/named.conf | \
		egrep -v ".*[#,//].*pid-file" | \
		head -n 1 | \
		sed -ne 's:.*pid-file\(.*\)\"\(.*\)\";:\2:p')
	[ -n "$PIDFILE" ] || PIDFILE=/var/run/named.pid

	PIDFILE="${CHROOT}$PIDFILE"

	KEY="${CHROOT}/etc/bind/rndc.key"
------------------------------------------------------------	

with the lines provided by Christian's old named script

----------------------------------------------
	if [$CHROOT -a -d $CHROOT ] ; then
		PIDFILE="${CHROOT}/var/run/named/named.pid"
		KEY="${CHROOT}/etc/bind/rndc.key"
	else
		PIDFILE="/var/run/named/named.pid"
		KEY="/etc/bind/rndc.key"
	fi
----------------------------------------------

seems that there are still chroot and non chroot cases needed. Or did we
something wrong?
Comment 4 Konstantin Arkhipov (RETIRED) gentoo-dev 2005-09-30 11:49:33 UTC
fixed in 9.3.1-r5 and 9.2.5-r7

solution taken from bug #107724

sorry for delay.