diff options
author | João Henriques <joaoh88@gmail.com> | 2021-04-18 23:41:30 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-08-02 21:41:32 +0100 |
commit | da5fd910733c909ca800040c0def817d28a22e55 (patch) | |
tree | 0920cb6e9ed318ba26fcc5968b90c411f49bf835 /package/network | |
parent | 9531e70708f80d14dd948f5890858a103f03a3d3 (diff) | |
download | upstream-da5fd910733c909ca800040c0def817d28a22e55.tar.gz upstream-da5fd910733c909ca800040c0def817d28a22e55.tar.bz2 upstream-da5fd910733c909ca800040c0def817d28a22e55.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>
(cherry picked from commit e8a5670122e04574fdb5855ecd63d18f317c5bfd)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network')
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 7 |
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 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" |