luci-app-turboacc: adapt dnsmasq settings

This commit is contained in:
lean 2022-07-19 23:11:11 +08:00
parent f6e8e0d314
commit 513770ccb0

View File

@ -220,7 +220,11 @@ revert_dns() {
[ -e "/var/run/dnscache/.dns-changed" ] || return 1
uci -q del_list dhcp.@dnsmasq[0].server="127.0.0.1#5333"
uci set dhcp.@dnsmasq[0].resolvfile="/tmp/resolv.conf.d/resolv.conf.auto"
if [ -s "/tmp/resolv.conf.auto" ]; then
uci set dhcp.@dnsmasq[0].resolvfile="/tmp/resolv.conf.auto"
else
uci set dhcp.@dnsmasq[0].resolvfile="/tmp/resolv.conf.d/resolv.conf.auto"
fi
uci set dhcp.@dnsmasq[0].noresolv="0"
uci commit dhcp