diff options
author | Floris Bos <bos@je-eigen-domein.nl> | 2017-04-11 14:19:57 +0100 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2017-04-11 14:19:57 +0100 |
commit | bc87e609c20445d874b07e71b63ad7ee0671f5f1 (patch) | |
tree | 4c9b91d53e98443aa8640f1f9f8dff85f01c4ecb /debian | |
parent | 005c46d6f56261569d128943f90e6b2d3669efa9 (diff) | |
download | dnsmasq-bc87e609c20445d874b07e71b63ad7ee0671f5f1.tar.gz |
Debian initscript tweak.
Dnsmasq's startup script seems to assume users always want to use
dnsmasq as local DNS resolver, and tells resolvconf to put
"nameserver 127.0.0.1" in /etc/resolv.conf
The problem with this is that if users just want to use dnsmasq
as DHCP server, and put port=0 in /etc/dnsmasq.conf to disable
the DNS functionality, they end up with broken name resolving.
Put a basic check in the startup script that skips resolvconf
configuration if a line starting with port=0 is in /etc/dnsmasq.conf
This doesn't cover all cases (e.g. configuration could also be in
different file in /etc/dnsmasq.d), but is better than current
situation.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/init | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 14dbf44..292c2b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ dnsmasq (2.77-1) unstable; urgency=low * New upstream. - - -- Simon Kelley <simon@thekelleys.org.uk> Wed, 14 Dec 2016 18:01:40 +0000 + * Don't register as a resolvconf source when config file + includes port=0 to disable DNS. + + -- Simon Kelley <simon@thekelleys.org.uk> Tue, 11 Apr 2017 14:19:20 +0000 dnsmasq (2.76-5) unstable; urgency=medium diff --git a/debian/init b/debian/init index 8c562de..46abdc4 100644 --- a/debian/init +++ b/debian/init @@ -154,6 +154,11 @@ start_resolvconf() [ $interface = lo ] && return done +# Also skip this if DNS functionality is disabled in /etc/dnsmasq.conf + if grep -qs '^port=0' /etc/dnsmasq.conf; then + return + fi + if [ -x /sbin/resolvconf ] ; then echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME fi |