Bug 73929 - [patch] /etc/rc.d/named will not work with ports-named
Summary: [patch] /etc/rc.d/named will not work with ports-named
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 4.10-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Doug Barton
Depends on:
Reported: 2004-11-14 10:30 UTC by Oliver Lehmann
Modified: 2007-10-28 01:33 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Lehmann freebsd_committer 2004-11-14 10:30:27 UTC
	/etc/rc.d/named tries to run rndc-confgen if "${named_chrootdir}/etc/namedb/rndc.key" and "${named_chrootdir}/etc/namedb/rndc.conf"
	is nonexistent.
	a) rndc-confgen installed from dns/bind93 only generates /usr/local/etc/rndc.key and
	   ${confgen_chroot}/usr/local/etc/rndc.key so rndc-confgen will be run everytime
	   /etc/rc.d/named is called.
	b) /usr/local/sbin isn't in PATH at bootup - calling "rndc-confgen" at bootup will
	   fail. That will cause named to not startup.



	if [ "${PREFIX}"  = "/usr" -a ! -f "${named_chrootdir}/etc/namedb/rndc.key" -a ! -f "${named_chrootdir}/etc/namedb/rndc.conf" ] || \
	   [ "${PREFIX}" != "/usr" -a ! -f "${named_chrootdir}/${PREFIX}/etc/rndc.key" ] ; then
		${PREFIX}/sbin/rndc-confgen -a -b256 ${confgen_chroot}
How-To-Repeat: 	remove base-bind, install bind from ports, run /etc/rc.d/named and/or reboot
Comment 1 Doug Barton freebsd_committer 2005-12-05 09:18:33 UTC
Responsible Changed
From-To: freebsd-bugs->dougb

I handle this script
Comment 2 Doug Barton freebsd_committer 2007-10-22 10:49:50 UTC
State Changed
From-To: open->patched

I just committed version 1.27 of rc.d/named which has a 
fix for this issue. Please try it and let me know if it 
works for you. 

Comment 3 dfilter service freebsd_committer 2007-10-22 15:26:00 UTC
dougb       2007-10-22 09:38:44 UTC

  FreeBSD src repository

  Modified files:
    etc/rc.d             named 
  1. Determine the location of the rndc* binaries relative to $command
  so that when using named from the ports (or elsewhere) the proper rndc*
  commands will be run.
  2. Rework the stop routine using ideas from brooks and delphij.
  Specifically I am duplicating a lot of code from rc.subr's stop routine
  so that this one will behave more like the one in rc.subr, but use rndc
  to kill the daemon (or regular kill if that fails). This also avoids
  the problems related to using killall if rndc fails, which is bad if
  you're running more than one named on the same box.
  3. Take a concept from gshapiro and allow the rndc.key file to be
  owned by root OR the named_uid user.
  Although I used different solutions, this commit handles issues raised in:
  PR:     conf/73929
  PR:     conf/103976
  PR:     conf/109409
  Revision  Changes    Path
  1.27      +22 -14    src/etc/rc.d/named
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Doug Barton freebsd_committer 2007-10-28 01:33:10 UTC
State Changed
From-To: patched->closed

The patch has now been MFC'ed.