View previous topic :: View next topic |
Author |
Message |
ianneub Tux's lil' helper
Joined: 29 May 2003 Posts: 90 Location: HB, CA, USA
|
Posted: Mon Jun 16, 2003 6:29 pm Post subject: BIND9 Can't stop service correctly |
|
|
Hello all,
I've just emerge'd net-dns/bind-9.2.2 and ran the script to put it in a chroot'ed envirnment. I can't seem to stop the server cleanly.
Here is what I did:
Code: | emerge bind
ebuild /var/db/pkg/net-dns/bind-9.2.2/bind-9.2.2.ebuild config
echo "alias rndc='rndc -k /chroot/dns/etc/bind/rndc.key'" > /root/.bashrc # I had no /root/.bashrc
source /root/.bashrc
/etc/init.d/named start
/etc/init.d/named stop
* Stopping named... [ !! ] |
The default /etc/init.d/named script is looking for the pid file in the wrong place.
Code: | if [ $CHROOT -a -d $CHROOT ] ; then
PIDFILE="${CHROOT}/var/run/named.pid"
KEY="${CHROOT}/etc/bind/rndc.key"
else
PIDFILE="/var/run/named.pid"
KEY="/etc/bind/rndc.key"
fi |
The line "PIDFILE="${CHROOT}/var/run/named.pid"" should read "PIDFILE="${CHROOT}/var/run/named/named.pid"" according to the default /etc/bind/named.conf. _________________ There's nothing to see here, move along... |
|
Back to top |
|
|
jsleeper Tux's lil' helper
Joined: 04 Apr 2003 Posts: 75 Location: Virginia Beach, VA, US
|
Posted: Tue Jul 01, 2003 9:03 pm Post subject: |
|
|
I had the same situation, and this suggestion made it work correctly.
Thanks ianneub!!! _________________ are sigs really usefull? |
|
Back to top |
|
|
eagle_cz Apprentice
Joined: 06 Jun 2003 Posts: 214
|
Posted: Wed Jul 02, 2003 8:56 pm Post subject: |
|
|
lol i got same problem
named by default save pid to /var/run/named.pid
bun when i try to stop named, he is looking for /var/run/named/named.pid
Soution is to edit /etc/init.d/named a put /var/run/named.pid instead of $PIDFILE in stop section
i tested it on 2 machines... both had this problem
no im only wondering whi is he starting named as root, while there is ............... /usr/sbin/named -u named
chmmm ...any tips ? |
|
Back to top |
|
|
Sven Vermeulen Retired Dev
Joined: 29 Aug 2002 Posts: 1345 Location: Mechelen, Belgium
|
Posted: Thu Jul 03, 2003 9:01 am Post subject: |
|
|
A better solution is to not touch /etc/init.d/named but edit /etc/named.conf in which you can define pid-file. |
|
Back to top |
|
|
To Veteran
Joined: 12 Apr 2003 Posts: 1145 Location: Coimbra, Portugal
|
Posted: Thu Jul 03, 2003 12:01 pm Post subject: |
|
|
Sven Vermeulen wrote: | A better solution is to not touch /etc/init.d/named but edit /etc/named.conf in which you can define pid-file. |
Well that's what I did but it's /etc/bind/named.conf but I think everybody understood what you mean
Tó _________________
------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------ |
|
Back to top |
|
|
ianneub Tux's lil' helper
Joined: 29 May 2003 Posts: 90 Location: HB, CA, USA
|
Posted: Thu Jul 03, 2003 5:25 pm Post subject: |
|
|
Sven Vermeulen wrote: | A better solution is to not touch /etc/init.d/named but edit /etc/named.conf in which you can define pid-file. | Good call, but shouldn't the ebuild handle chroot properly? _________________ There's nothing to see here, move along... |
|
Back to top |
|
|
|