Our test for SetDomainServers being in dnsmasq relies on dnsmasq having
authorRoy Marples <roy@marples.name>
Fri, 7 Dec 2012 11:00:28 +0000 (11:00 +0000)
committerRoy Marples <roy@marples.name>
Fri, 7 Dec 2012 11:00:28 +0000 (11:00 +0000)
enable-dbus already set which may not be the case which causes needless spam.
Fix this in the code and advise adding enable-dbus to the main dnsmasq config.

dnsmasq.in
resolvconf.conf.5.in

index 44f73d1495613d3d117d0612c8a22dd09e931dac..1f7bb60b0ccab8802660eaa1b061194c4386c92a 100644 (file)
@@ -59,7 +59,9 @@ if [ -s "$dbus_pid" -a -s "$dnsmasq_pid" ]; then
                        kill -0 $(cat "$dnsmasq_pid") 2>/dev/null
                then
                        dbus=true
                        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">'
+                       # Stupid test as it relies on dnsmasq running AND
+                       # being configured for DBus
+                       if dbus-send --print-reply --system --dest=uk.org.thekelleys.dnsmasq /uk/org/thekelleys/dnsmasq org.freedesktop.DBus.Introspectable.Introspect 2>/dev/null | grep -q '<method name="SetDomainServers">'
                        then
                                dbus_ex=true
                        fi
                        then
                                dbus_ex=true
                        fi
index 10d7b46fc322da796169df11b1fca8a8b79c2a43..e9993a5a107324d548056976e59190a305ab2c0b 100644 (file)
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 2, 2012
+.Dd December 7, 2012
 .Dt RESOLVCONF.CONF 5 SMM
 .Os
 .Sh NAME
 .Dt RESOLVCONF.CONF 5 SMM
 .Os
 .Sh NAME
@@ -136,6 +136,9 @@ Example resolvconf.conf for dnsmasq:
 .Pp
 Example dnsmasq.conf:
 .D1 listen-address=127.0.0.1
 .Pp
 Example dnsmasq.conf:
 .D1 listen-address=127.0.0.1
+.D1 # If dnsmasq is compiled for DBus then we can take advantage of not
+.D1 # having to restart dnsmasq.
+.D1 enable-dbus
 .D1 conf-file=/etc/dnsmasq-conf.conf
 .D1 resolv-file=/etc/dnsmasq-resolv.conf
 .It Sy named_options
 .D1 conf-file=/etc/dnsmasq-conf.conf
 .D1 resolv-file=/etc/dnsmasq-resolv.conf
 .It Sy named_options