[avahi] No Search list for host-name lookup in resolv.conf written from avahi-dnsconfd

Claus Klein claus.klein at arcormail.de
Sat Apr 1 13:59:58 PST 2006


On Saturday 01 April 2006 16:10, Claus Klein wrote:
> Hi,
> 
> i have tested the avahi-dnsconfd daemon.
> 
> 
> My first question is : Why is there no search entry?
> 
> Second why are there double entries, my name server is only available over one interface?
> 
> Perhaps, should there be too a damain name entry?
> 

With this modifications, it works for me on Suse linux 9.3:

P3linux:/usr/local/etc/avahi # diff -u avahi-dnsconfd.action.orig avahi-dnsconfd.action
--- avahi-dnsconfd.action.orig  2006-03-27 22:42:49.000000000 +0200
+++ avahi-dnsconfd.action       2006-04-01 23:35:31.000000000 +0200
@@ -46,6 +46,16 @@
             echo "nameserver $n"
         done | /sbin/resolvconf -a "$AVAHI_INTERFACE.avahi"
     fi
+elif [ -x /sbin/modify_resolvconf ] ; then
+
+    # We have Suse's modify_resolvconf tool
+
+    if [ "x$AVAHI_INTERFACE_DNS_SERVERS" = "x" ] ; then
+        /sbin/modify_resolvconf restore -s dnsconfd -p avahi-dnsconfd -t "prepared by ck" -e "$AVAHI_INTERFACE"
+    else
+        /sbin/modify_resolvconf  modify -s dnsconfd -p avahi-dnsconfd -t "prepared by ck" -e "$AVAHI_INTERFACE" \
+        -n "$AVAHI_DNS_SERVERS" -l `dnsdomainname`
+    fi
 else

     # No resolvconf tool available
@@ -55,8 +65,9 @@
     else
         test -f /etc/resolv.conf.avahi || mv /etc/resolv.conf /etc/resolv.conf.avahi

+        echo search `dnsdomainname` > /etc/resolv.conf
         for n in $AVAHI_DNS_SERVERS ; do
             echo "nameserver $n"
-        done > /etc/resolv.conf
+        done | sort -u >> /etc/resolv.conf
     fi
 fi
P3linux:/usr/local/etc/avahi #

this results in:
diff -u /etc/resolv.conf.saved.by.dnsconfd.eth*
--- /etc/resolv.conf.saved.by.dnsconfd.eth0     2006-04-01 23:43:15.000000000 +0200
+++ /etc/resolv.conf.saved.by.dnsconfd.eth1     2006-04-01 18:18:30.000000000 +0200
@@ -1,24 +1,3 @@
-### BEGIN INFO
-#
-# Modified_by:  dnsconfd
-# Backup:       /etc/resolv.conf.saved.by.dnsconfd.eth1
-# Process:      avahi-dnsconfd
-# Process_id:   19409
-# Script:
-# Saveto:
-# Info:         This is a temporary resolv.conf created by service dnsconfd.
-#               The previous file has been saved and will be restored later.
-#
-#               If you don't like your resolv.conf to be changed, you
-#               can set MODIFY_{RESOLV,NAMED}_CONF_DYNAMICALLY=no. This
-#               variables are placed in /etc/sysconfig/network/config.
-#
-#               You can also configure service dnsconfd not to
-#               modify it.
-#
-#               prepared by ck
-#
-### END INFO
 search clausklein.homelinux.net
-nameserver 192.168.1.2
 nameserver 192.168.1.1
+nameserver 192.168.1.2
P3linux:/usr/local/etc/avahi # 


The only qustion left is: why are there 2 nameservers?

P3linux:/usr/local/etc/avahi # ip neigh
192.168.1.1 dev eth0  FAILED
192.168.1.2 dev eth0 lladdr 00:0f:66:a3:95:79 REACHABLE
P3linux:/usr/local/etc/avahi #             

My old router is switched off!

For me, is is good.

claus




More information about the avahi mailing list