[openwrt/openwrt] dnsmasq: add ignore hosts dir to dnsmasq init script
LEDE Commits
lede-commits at lists.infradead.org
Mon Aug 2 16:47:04 PDT 2021
dangole pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/da5fd910733c909ca800040c0def817d28a22e55
commit da5fd910733c909ca800040c0def817d28a22e55
Author: João Henriques <joaoh88 at gmail.com>
AuthorDate: Sun Apr 18 23:41:30 2021 +0100
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 at gmail.com>
(cherry picked from commit e8a5670122e04574fdb5855ecd63d18f317c5bfd)
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
package/network/services/dnsmasq/files/dnsmasq.init | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 2620821638..97b72c2bbd 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -1020,7 +1020,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"
More information about the lede-commits
mailing list