aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorJoão Henriques <joaoh88@gmail.com>2021-04-18 23:41:30 +0100
committerHans Dedecker <dedeckeh@gmail.com>2021-04-24 21:35:27 +0200
commite8a5670122e04574fdb5855ecd63d18f317c5bfd (patch)
tree2022e991017a2af8145b463b76fb78db649d8835 /package/network
parentc61ab68387f61d3e90569a1779f29ce49dde55c6 (diff)
downloadupstream-e8a5670122e04574fdb5855ecd63d18f317c5bfd.tar.gz
upstream-e8a5670122e04574fdb5855ecd63d18f317c5bfd.tar.bz2
upstream-e8a5670122e04574fdb5855ecd63d18f317c5bfd.zip
dnsmasq: add ignore hosts dir to dnsmasq init script
When running multiple instances of dnsmasq, for example one being for the lan and another for a guest network, it might not be desirable to have the same dns names configured in both networks Signed-off-by: João Henriques <joaoh88@gmail.com>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 680e72f9e7..44e7d2d4f9 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -1012,7 +1012,12 @@ dnsmasq_start()
xappend "--dhcp-broadcast=tag:needs-broadcast"
- xappend "--addn-hosts=$(dirname $HOSTFILE)"
+ config_get_bool ignore_hosts_dir "$cfg" ignore_hosts_dir 0
+ if [ "$ignore_hosts_dir" = "1" ]; then
+ xappend "--addn-hosts=$HOSTFILE"
+ else
+ xappend "--addn-hosts=$(dirname $HOSTFILE)"
+ fi
config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq.d"
xappend "--conf-dir=$dnsmasqconfdir"