> I've attached such a patch to this message, it is trivial and does not break
> your current system, I would appreciate if you accept it or provide an
> alternative that removes the need to change the scripts and review them on
> each upgrade.

Sorry, I forgot the patch.

-- 
Sergio Talens-Oliag <[EMAIL PROTECTED]>   <http://people.debian.org/~sto/>
Key fingerprint = 29DF 544F  1BD9 548C  8F15 86EF  6770 052B  B8C1 FA69
diff -ruN pdnsd-1.2.6-par.orig/debian/changelog pdnsd-1.2.6-par/debian/changelog
--- pdnsd-1.2.6-par.orig/debian/changelog	2007-09-24 19:48:15.000000000 +0200
+++ pdnsd-1.2.6-par/debian/changelog	2007-09-24 19:53:13.000000000 +0200
@@ -1,3 +1,11 @@
+pdnsd (1.2.6-par-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Modified init.d and resolvconf scripts to support the use of pdnsd +
+    resolvconf when pdnsd is listening on an IP other than 127.0.0.1
+
+ -- Sergio Talens-Oliag <[EMAIL PROTECTED]>  Mon, 24 Sep 2007 19:51:10 +0200
+
 pdnsd (1.2.6-par-1) unstable; urgency=low
 
   * New upstream release.
diff -ruN pdnsd-1.2.6-par.orig/debian/default pdnsd-1.2.6-par/debian/default
--- pdnsd-1.2.6-par.orig/debian/default	2007-09-24 19:48:15.000000000 +0200
+++ pdnsd-1.2.6-par/debian/default	2007-09-24 23:57:10.000000000 +0200
@@ -4,3 +4,7 @@
 AUTO_MODE=
 # optional CLI options to pass to pdnsd(8)
 START_OPTIONS=
+# adjust the pdnsd server ip for resolvconf, the value defaults to 127.0.0.1
+# and only needs to be changed when resolvconf is installed and the
+# 'pdnsd.conf' contains a server_ip different than '127.0.0.1' or 'any'.
+PDNSD_SERVER_IP=
diff -ruN 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	2007-09-24 19:48:15.000000000 +0200
+++ pdnsd-1.2.6-par/debian/init.d	2007-09-24 23:50:27.000000000 +0200
@@ -63,7 +63,10 @@
     pdnsd-ctl status >/dev/null 2>&1 || return $?
 
     if [ -x /sbin/resolvconf ] ; then
-        echo "nameserver 127.0.0.1" | /sbin/resolvconf -a "lo.$NAME"
+        if [ -z "${PDNSD_SERVER_IP}" ]; then
+            PDNSD_SERVER_IP="127.0.0.1";
+        fi
+        echo "nameserver ${PDNSD_SERVER_IP}" | /sbin/resolvconf -a "lo.$NAME"
     fi
 }
 
diff -ruN pdnsd-1.2.6-par.orig/debian/resolvconf pdnsd-1.2.6-par/debian/resolvconf
--- pdnsd-1.2.6-par.orig/debian/resolvconf	2007-09-24 19:48:15.000000000 +0200
+++ pdnsd-1.2.6-par/debian/resolvconf	2007-09-24 23:51:31.000000000 +0200
@@ -22,6 +22,13 @@
 [ -x /lib/resolvconf/list-records ] || exit 1
 [ -e /var/cache/pdnsd/pdnsd.status ] || exit 0
 
+if test -r /etc/default/pdnsd; then
+    . "/etc/default/pdnsd"
+fi
+if [ -z "$PDNSD_SERVER_IP" ]; then
+    PDNSD_SERVER_IP="127.0.0.1";
+fi
+
 PATH=/bin:/sbin
 
 uniquify()
@@ -39,7 +46,7 @@
 
 uniquify "`cat $(/lib/resolvconf/list-records) /dev/null            \
             | sed -n -e 's/^[[:space:]]*nameserver[[:space:]]\+//p' \
-            | grep -v '^127.0.0.1$'`"
+            | grep -v "^$PDNSD_SERVER_IP$"`"
 
 if [ -n "$RSLT" ] ; then
 	OUTPUT="$(/usr/sbin/pdnsd-ctl server resolvconf up "$RSLT" || :)"

Attachment: signature.asc
Description: Digital signature

Reply via email to