Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31210 - net-dns/bind/bind-9.2.2.ebuild named init.d script unable to STOP chroot bind
Summary: net-dns/bind/bind-9.2.2.ebuild named init.d script unable to STOP chroot bind
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Stewart (RETIRED)
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-15 09:17 UTC by Baelbouga
Modified: 2003-12-26 11:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baelbouga 2003-10-15 09:17:30 UTC
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)
Comment 1 Baelbouga 2003-10-15 09:18:23 UTC
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
Comment 2 Stewart (RETIRED) gentoo-dev 2003-11-05 19:55:17 UTC
Everything seems to be in order. Please update or re-install BIND and test.
Comment 3 Stewart (RETIRED) gentoo-dev 2003-11-05 20:07:35 UTC
Fixed in CVS.
Comment 4 Baelbouga 2003-12-01 11:50:32 UTC
I was finally able to test the fix with a clean install. Works great! No need to modify anything to start or stop named.
Comment 5 Stewart (RETIRED) gentoo-dev 2003-12-26 11:44:50 UTC
No new reports of problems, and the cause was fairly obvious, so I'm closing this one.