dnsmasq: add directory for external hosts-files
[openwrt/openwrt.git] / package / network / services / dnsmasq / files / dnsmasq.init
index 62adb26233ce1f9af8eeccae836688023b19ccc8..cc5ff7da6a639dad74d10477b657197d80d6707e 100644 (file)
@@ -134,6 +134,9 @@ dnsmasq() {
        config_get hostsfile "$cfg" dhcphostsfile
        [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
 
+       mkdir -p /tmp/hosts
+       xappend "--addn-hosts=/tmp/hosts"
+
        local rebind
        config_get_bool rebind "$cfg" rebind_protection 1
        [ $rebind -gt 0 ] && {