dnsmasq: make /tmp/dnsmasq.d and /tmp/hosts preferred over UCI settings
authorSteven Barth <cyrus@openwrt.org>
Wed, 2 Sep 2015 11:49:00 +0000 (11:49 +0000)
committerSteven Barth <cyrus@openwrt.org>
Wed, 2 Sep 2015 11:49:00 +0000 (11:49 +0000)
Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 46770

package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init

index 444459baaaabaddf995061e0f34be187e00dd496..864914effcca303818c25c275cd7678f446b707e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.75
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
index ab64e88a93e876bb0cbb04841dbf0ae43067f9d5..1b42cff3941a35cfe4146ca1e3569c6452d4e574 100644 (file)
@@ -176,10 +176,6 @@ dnsmasq() {
        config_get hostsfile "$cfg" dhcphostsfile
        [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
 
-       mkdir -p /tmp/hosts /tmp/dnsmasq.d
-       xappend "--addn-hosts=/tmp/hosts"
-       xappend "--conf-dir=/tmp/dnsmasq.d"
-
        local rebind
        config_get_bool rebind "$cfg" rebind_protection 1
        [ $rebind -gt 0 ] && {
@@ -215,6 +211,10 @@ dnsmasq() {
 
        xappend "--dhcp-broadcast=tag:needs-broadcast"
 
+       mkdir -p /tmp/hosts /tmp/dnsmasq.d
+       xappend "--addn-hosts=/tmp/hosts"
+       xappend "--conf-dir=/tmp/dnsmasq.d"
+
        echo >> $CONFIGFILE
 }