summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73>2014-01-17 14:00:09 +0000
committercyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73>2014-01-17 14:00:09 +0000
commit06eacad9078b375ea9b4a31440a4d7aa4d0b7f61 (patch)
tree3ccd0b38e478421f9cafed417c8d7e0e329c0e41
parent0182f9c0e0168908f83fdecde9821cc47d960549 (diff)
dnsmasq: add dnsmasq.d config folder & improve odhcpd coexistence
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39312 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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 0ff987f69c..b5fb58c524 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