mirror of
https://github.com/openwrt/packages.git
synced 2026-11-29 22:53:21 +04:00
When unbound serves the local resolver, it removes /tmp/resolv.conf and writes its own file in its place, so a lookup in between finds none. The file also lies outside /tmp/resolv.conf.d, where jails sharing the host network cannot follow its replacement. Write the configuration to a temporary file in /tmp/resolv.conf.d and rename it over resolv.conf there, as dnsmasq does. On stop, put back the relative link to resolv.conf.auto the same way. Both point /tmp/resolv.conf at resolv.conf.d/resolv.conf if it does not already, which also covers a file left behind by an earlier unbound. Signed-off-by: Daniel Golle <daniel@makrotopia.org>