--- debian/pdns-recursor.init	2005/04/19 00:20:58	1.1
+++ debian/pdns-recursor.init	2005/04/19 03:48:37
@@ -25,11 +25,15 @@
   start)
     echo -n "Starting $DESC: "
     if [ "$START" = "yes" ]; then
-      $NAME --daemon 2>&1 /dev/null
+      PORT=`$NAME --daemon 2>&1 | sed -n "
+        s/^.*Incoming query source port: //
+        T
+        p
+      "`
       echo "done."
 
       if test -x /sbin/resolvconf; then
-        echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
+        echo "nameserver 127.0.0.1:$PORT" | /sbin/resolvconf -a lo
       fi
     else
       echo "disabled"
