summaryrefslogtreecommitdiff
path: root/package/network/services/dnsmasq
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2014-01-17 14:00:09 +0000
committerSteven Barth <cyrus@openwrt.org>2014-01-17 14:00:09 +0000
commit9ec0e5df148875b7ce9b020818edff930f00fb26 (patch)
treea2f2c4842e16b54a5b39bae695fd1608798b3453 /package/network/services/dnsmasq
parent140a5b22d944ff4949fcb50fd72a0305fe9e3c1a (diff)
downloadmtk-20170518-9ec0e5df148875b7ce9b020818edff930f00fb26.zip
mtk-20170518-9ec0e5df148875b7ce9b020818edff930f00fb26.tar.gz
mtk-20170518-9ec0e5df148875b7ce9b020818edff930f00fb26.tar.bz2
dnsmasq: add dnsmasq.d config folder & improve odhcpd coexistence
SVN-Revision: 39312
Diffstat (limited to 'package/network/services/dnsmasq')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init10
1 files changed, 8 insertions, 2 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 0ff987f..b5fb58c 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -158,8 +158,9 @@ dnsmasq() {
config_get hostsfile "$cfg" dhcphostsfile
[ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
- mkdir -p /tmp/hosts
+ 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
@@ -559,7 +560,12 @@ start_service() {
config_foreach dhcp_srv_add srvhost
config_foreach dhcp_mx_add mxhost
echo >> $CONFIGFILE
- config_foreach dhcp_add dhcp
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
echo >> $CONFIGFILE
config_foreach dhcp_cname_add cname
echo >> $CONFIGFILE