Ticket #244: 0001-avahi-dnsconfd-add-support-for-SUSE-s-resolv.conf-to.diff

File 0001-avahi-dnsconfd-add-support-for-SUSE-s-resolv.conf-to.diff, 1.7 KB (added by lnussel, 4 years ago)
  • avahi-dnsconfd/avahi-dnsconfd.action

    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  
    3535#   $AVAHI_INTERFACE_DNS_SERVERS   A whitespace seperated list of DNS servers on $AVAHI_INTERFACE 
    3636#   $AVAHI_DNS_SERVERS             The complete list of all DNS servers found on all interfaces 
    3737 
    38 if [ -x /sbin/resolvconf ] ; then 
     38if [ -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 
     48elif [ -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 
     58elif [ -x /sbin/resolvconf ] ; then 
    3959 
    4060    # We have Debian's resolvconf tool 
    4161