Package: pdnsd
Version: 1.2.6-par-5
Severity: wishlist
Tags: patch
Hi,
pdnsd's init script waits for pdnsd's status to become available, so it
can configure resolvconf correctly, even when resolvconf is not
installed. The attached patch checks to see if resolvconf is installed
before waiting, which avoids a six-second wait if psdnd's status
reporting is disabled.
Regards,
Stephen
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing'), (300, 'stable'), (200, 'unstable'), (1,
'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.23-1-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages pdnsd depends on:
ii adduser 3.105 add and remove users and groups
ii debconf [debconf-2.0] 1.5.18 Debian configuration management sy
ii libc6 2.7-5 GNU C Library: Shared libraries
Versions of packages pdnsd recommends:
pn resolvconf <none> (no description available)
-- debconf information:
* pdnsd/conf: Manual
diff -u -r pdnsd-1.2.6-par.orig/debian/init.d pdnsd-1.2.6-par/debian/init.d
--- pdnsd-1.2.6-par.orig/debian/init.d 2008-01-23 14:43:38.000000000 +0100
+++ pdnsd-1.2.6-par/debian/init.d 2008-01-23 14:44:41.000000000 +0100
@@ -54,18 +54,20 @@
start_resolvconf()
{
- for f in `seq 1 60`; do
- sleep 0.1
- if pdnsd-ctl status >/dev/null 2>&1; then
- break
- fi
- done
- if pdnsd-ctl status | grep -q resolvconf; then
- server=$(pdnsd-ctl status|sed -ne '/^Global:$/,/^Server.*:$/s/.*Server
ip.*: \(.*\)$/\1/p')
- if test "$server" = "0.0.0.0"; then server="127.0.0.1"; fi
- if [ -n "$server" -a -x /sbin/resolvconf ] ; then
- echo "nameserver $server" | /sbin/resolvconf -a "lo.$NAME"
- fi
+ if [ -x /sbin/resolvconf ]; then
+ for f in `seq 1 60`; do
+ sleep 0.1
+ if pdnsd-ctl status >/dev/null 2>&1; then
+ break
+ fi
+ done
+ if pdnsd-ctl status | grep -q resolvconf; then
+ server=$(pdnsd-ctl status|sed -ne
'/^Global:$/,/^Server.*:$/s/.*Server ip.*: \(.*\)$/\1/p')
+ if test "$server" = "0.0.0.0"; then server="127.0.0.1"; fi
+ if [ -n "$server" ] ; then
+ echo "nameserver $server" | /sbin/resolvconf -a "lo.$NAME"
+ fi
+ fi
fi
}