Package: bind9
Version: 9.3.4-2etch1
Tags: patch
I've just had a problem where puppet (configuration management tool)
effectively ran: "bind9 stop; bind9 start". This failed as when start
was run, the stop hadn't finished.
This patch uses rndc to ask for the pid and waits for it to die.
The 2 second hack is then removed (replaced by 1 second in a loop hack).
Adrian
--
Email: [EMAIL PROTECTED] -*- GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution -*- www.debian.org
--- bind9.orig 2008-01-18 15:50:21.000000000 +0000
+++ bind9 2008-01-18 15:58:27.000000000 +0000
@@ -46,7 +46,13 @@
if [ "X$RESOLVCONF" != "Xno" ] && [ -x /sbin/resolvconf ] ; then
/sbin/resolvconf -d lo.named
fi
- /usr/sbin/rndc stop
+ pid=`/usr/sbin/rndc stop -p | sed -n 's/^pid: //; T; p'`
+ if [ "$pid" ]; then
+ while kill -0 $pid 2>/dev/null; do
+ log_progress_msg "waiting for pid $pid to die"
+ sleep 1
+ done
+ fi
log_end_msg $?
;;
@@ -58,7 +64,6 @@
restart)
$0 stop
- sleep 2
$0 start
;;