The /etc/init.d/named is unable to stop bind when running in a chroot'ed environment. This is a semi-duplicate to Bug #22959. The fix for Bug #23682 should have only been done to the NON-chroot'ed $PIDFILE definition. Also, the stop output should state that it is stopping a chroot'ed named. Reproducible: Always Steps to Reproduce: 1. emerge bind 2. ebuild /var/db/pkg/net-dns/bind-9.2.2-r2/bind-9.2.2-r2.ebuild config 3. /etc/init.d/named start 4. /etc/init.d/named stop Actual Results: * Stopping named... [ !! ] (named still running) Expected Results: * Stopping chrooted named... [ ok ] (named stopped running)
This change will provide the desired results and not effect the non-chroot'ed environment. *** named.bak Wed Sep 17 12:59:53 2003 --- named Wed Oct 15 10:26:32 2003 *************** *** 23,27 **** if [ $CHROOT -a -d $CHROOT ] ; then ! PIDFILE="${CHROOT}/var/run/named/named.pid" KEY="${CHROOT}/etc/bind/rndc.key" else --- 23,27 ---- if [ $CHROOT -a -d $CHROOT ] ; then ! PIDFILE="${CHROOT}/var/run/named.pid" KEY="${CHROOT}/etc/bind/rndc.key" else *************** *** 39,43 **** stop() { ! ebegin "Stopping named" checkconfig || return 2 start-stop-daemon --stop --quiet --pidfile $PIDFILE --- 39,43 ---- stop() { ! ebegin "Stopping ${CHROOT:+chrooted }named" checkconfig || return 2 start-stop-daemon --stop --quiet --pidfile $PIDFILE
Everything seems to be in order. Please update or re-install BIND and test.
Fixed in CVS.
I was finally able to test the fix with a clean install. Works great! No need to modify anything to start or stop named.
No new reports of problems, and the cause was fairly obvious, so I'm closing this one.