From d5d4043c935cd136a0df74ec671c2f77940c16e0 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Fri, 10 May 2019 20:14:59 +0100 Subject: [PATCH] dnsmasq: use hostsdir instead of addn-hosts dnsmasq will dynamically scan changes/additions to hosts in hostsdir whereas addn-hosts needs a SIGHUP. Take advantage of this automatic updating in preparation for a dhcpd update take only signals addn-hosts - xappend "--addn-hosts=$(dirname $HOSTFILE)" + xappend "--hostsdir=$(dirname $HOSTFILE)" Signed-off-by: Kevin Darbyshire-Bryant --- package/network/services/dnsmasq/files/dnsmasq.init | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index fd2ce3d2de..ec9ae84ce1 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -1000,8 +1000,8 @@ dnsmasq_start() xappend "--addn-hosts=$HOSTFILE" append EXTRA_MOUNT "$HOSTFILE" else - xappend "--addn-hosts=$HOSTFILE_DIR" - append EXTRA_MOUNT "$HOSTFILE_DIR" + xappend "--addn-hosts=$(dirname $HOSTFILE)" + append EXTRA_MOUNT "$(dirname $HOSTFILE)" fi config_list_foreach "$cfg" "addnhosts" append_addnhosts config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain @@ -1105,7 +1105,6 @@ dnsmasq_start() xappend "--dhcp-broadcast=tag:needs-broadcast" - config_get dnsmasqconfdir "$cfg" confdir "/tmp/dnsmasq.d" xappend "--conf-dir=$dnsmasqconfdir" dnsmasqconfdir="${dnsmasqconfdir%%,*}" -- 2.30.2