Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/openresolv/dist Import openresolv-3.5.5 with th...



details:   https://anonhg.NetBSD.org/src/rev/723570246980
branches:  trunk
changeset: 787147:723570246980
user:      roy <roy%NetBSD.org@localhost>
date:      Tue Jun 04 09:37:21 2013 +0000

description:
Import openresolv-3.5.5 with the following changes from 3.5.3
 * Fix setting IPv6 namservers over DBus to dnsmasq
 * Fix pdnsd config file generation
 * Man page fixes

diffstat:

 external/bsd/openresolv/dist/dnsmasq.in    |  28 +++++++++++-----------------
 external/bsd/openresolv/dist/pdnsd.in      |   8 ++++----
 external/bsd/openresolv/dist/resolvconf.in |   4 ++++
 3 files changed, 19 insertions(+), 21 deletions(-)

diffs (97 lines):

diff -r 4b61ecb7e820 -r 723570246980 external/bsd/openresolv/dist/dnsmasq.in
--- a/external/bsd/openresolv/dist/dnsmasq.in   Tue Jun 04 07:47:54 2013 +0000
+++ b/external/bsd/openresolv/dist/dnsmasq.in   Tue Jun 04 09:37:21 2013 +0000
@@ -47,23 +47,17 @@
 # Check for DBus support in the binary
 dbus=false
 dbus_ex=false
-: ${dbus_pid:=/var/run/dbus/dbus.pid}
-[ -s "$dbus_pid" ] || dbus_pid=/var/run/dbus.pid
-[ -s "$dbus_pid" ] || dbus_pid=/var/run/dbus/pid
-if [ -s "$dbus_pid" -a -s "$dnsmasq_pid" ]; then
-       if dnsmasq --version 2>/dev/null | \
-               grep -q "^Compile time options.*[[:space:]]DBus[[:space:]]"
+dbus_introspect=$(dbus-send --print-reply --system \
+       --dest=uk.org.thekelleys.dnsmasq \
+       /uk/org/thekelleys/dnsmasq \
+       org.freedesktop.DBus.Introspectable.Introspect \
+       2>/dev/null)
+if [ $? = 0 ]; then
+       dbus=true
+       if printf %s "$dbus_introspect" | \
+           grep -q '<method name="SetDomainServers">'
        then
-               # Sanity - check that dnsmasq and dbus are running
-               if kill -0 $(cat "$dbus_pid") 2>/dev/null && \
-                       kill -0 $(cat "$dnsmasq_pid") 2>/dev/null
-               then
-                       dbus=true
-                       if dbus-send --print-reply --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq org.freedesktop.DBus.Introspectable.Introspect | grep -q '<method 
name="SetDomainServers">'
-                       then
-                               dbus_ex=true
-                       fi
-               fi
+               dbus_ex=true
        fi
 fi
 
@@ -151,7 +145,7 @@
 
 if $dbus; then
        newconf="$newconf$NL# Domain specific servers will"
-       newconf="$newconf be sent over dbus${NL}enable-dbus$NL"
+       newconf="$newconf be sent over dbus${NL}"
 else
        newconf="$newconf$conf"
 fi
diff -r 4b61ecb7e820 -r 723570246980 external/bsd/openresolv/dist/pdnsd.in
--- a/external/bsd/openresolv/dist/pdnsd.in     Tue Jun 04 07:47:54 2013 +0000
+++ b/external/bsd/openresolv/dist/pdnsd.in     Tue Jun 04 09:37:21 2013 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (c) 2010-2011 Roy Marples
+# Copyright (c) 2010-2013 Roy Marples
 # All rights reserved
 
 # pdnsd subscriber for resolvconf
@@ -82,7 +82,7 @@
        return 0
 }
 
-newresolv="# Generated by resolvconf\n"
+newresolv="# Generated by resolvconf$NL"
 changed=false
 
 # Try to ensure that config dirs exist
@@ -94,7 +94,7 @@
 
 if [ -n "$pdnsd_resolv" ]; then
        for n in $NAMESERVERS; do
-               newresolv="${newresolv}nameserver $n\n"
+               newresolv="${newresolv}nameserver $n$NL"
        done
 fi
 
@@ -146,7 +146,7 @@
        fi
        if change_file "$pdnsd_conf" "$cf"; then
                changed=true
-       fi      
+       fi
 fi
 
 if [ -n "$pdnsd_resolv" ]; then
diff -r 4b61ecb7e820 -r 723570246980 external/bsd/openresolv/dist/resolvconf.in
--- a/external/bsd/openresolv/dist/resolvconf.in        Tue Jun 04 07:47:54 2013 +0000
+++ b/external/bsd/openresolv/dist/resolvconf.in        Tue Jun 04 09:37:21 2013 +0000
@@ -28,6 +28,10 @@
 SYSCONFDIR=@SYSCONFDIR@
 LIBEXECDIR=@LIBEXECDIR@
 VARDIR=@VARDIR@
+
+# Disregard dhcpcd setting
+unset interface_order
+
 # Support original resolvconf configuration layout
 # as well as the openresolv config file
 if [ -f "$SYSCONFDIR"/resolvconf.conf ]; then



Home | Main Index | Thread Index | Old Index