mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-01 08:48:08 +00:00
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> Signed-off-by: maurerr <mariusd84@gmail.com>
This commit is contained in:
parent
167ad0b5d0
commit
b386e265c6
@ -1012,7 +1012,12 @@ dnsmasq_start()
|
|||||||
|
|
||||||
xappend "--dhcp-broadcast=tag:needs-broadcast"
|
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"
|
config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq.d"
|
||||||
xappend "--conf-dir=$dnsmasqconfdir"
|
xappend "--conf-dir=$dnsmasqconfdir"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user