unbound: follow resolv.conf.auto to new location

Signed-off-by: Eric Luehrsen <ericluehrsen@gmail.com>
This commit is contained in:
Eric Luehrsen
2020-08-07 00:03:36 -04:00
parent 65c66ddd71
commit f8ba0fe7bf
4 changed files with 16 additions and 10 deletions

View File

@@ -161,7 +161,7 @@ bundle_wan_networks() {
##############################################################################
bundle_resolv_conf_servers() {
local resolvers=$( awk '/nameserver/ { print $2 }' /tmp/resolv.conf.auto )
local resolvers=$( awk '/nameserver/ { print $2 }' $UB_RESOLV_AUTO )
UB_LIST_ZONE_SERVERS="$UB_LIST_ZONE_SERVERS $resolvers"
}
@@ -1527,14 +1527,14 @@ resolv_setup() {
else
# unbound listens on 127.0.0.1#53 so set resolver file to local.
rm -f /tmp/resolv.conf
rm -f $UB_RESOLV_CONF
{
echo "# /tmp/resolv.conf generated by Unbound UCI $( date -Is )"
echo "# $UB_RESOLV_CONF generated by Unbound UCI $( date -Is )"
echo "nameserver 127.0.0.1"
echo "nameserver ::1"
echo "search $UB_TXT_DOMAIN."
} > /tmp/resolv.conf
} > $UB_RESOLV_CONF
fi
}