From 729b213763a261cb41499c501b09a790afd1073c Mon Sep 17 00:00:00 2001
From: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Wed, 1 Oct 2008 14:31:08 +0200
Subject: [PATCH] avahi-dnsconfd: add support for SUSE's resolv.conf tools
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
---
avahi-dnsconfd/avahi-dnsconfd.action | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/avahi-dnsconfd/avahi-dnsconfd.action b/avahi-dnsconfd/avahi-dnsconfd.action
index 9337a6d..f7d3aa4 100755
|
a
|
b
|
|
| 35 | 35 | # $AVAHI_INTERFACE_DNS_SERVERS A whitespace seperated list of DNS servers on $AVAHI_INTERFACE |
| 36 | 36 | # $AVAHI_DNS_SERVERS The complete list of all DNS servers found on all interfaces |
| 37 | 37 | |
| 38 | | if [ -x /sbin/resolvconf ] ; then |
| | 38 | if [ -x /sbin/netconfig ]; then |
| | 39 | # SUSE method on 11.1+ |
| | 40 | if [ -n "$AVAHI_INTERFACE_DNS_SERVERS" ]; then |
| | 41 | /sbin/netconfig modify -s avahi -i "$AVAHI_INTERFACE" <<-EOF |
| | 42 | INTERFACE='$AVAHI_INTERFACE' |
| | 43 | DNSSERVERS='$AVAHI_INTERFACE_DNS_SERVERS' |
| | 44 | EOF |
| | 45 | else |
| | 46 | /sbin/netconfig remove -s avahi -i "$AVAHI_INTERFACE" |
| | 47 | fi |
| | 48 | elif [ -x /sbin/modify_resolvconf ] ; then |
| | 49 | # method for SUSE <= 11.0 |
| | 50 | if [ -n "$AVAHI_DNS_SERVERS" ]; then |
| | 51 | /sbin/modify_resolvconf modify -s avahi -t - -p avahi-dnsconfd -n "$AVAHI_DNS_SERVERS" <<-EOF |
| | 52 | if you don't like avahi to update your Nameservers |
| | 53 | disable the avahi-dnsconfd init script |
| | 54 | EOF |
| | 55 | else |
| | 56 | /sbin/modify_resolvconf restore -s avahi |
| | 57 | fi |
| | 58 | elif [ -x /sbin/resolvconf ] ; then |
| 39 | 59 | |
| 40 | 60 | # We have Debian's resolvconf tool |
| 41 | 61 | |