fix dnsmasq resolvfile path (#5159)

This commit is contained in:
Hugo Yuan 2020-07-22 16:43:42 +08:00 committed by GitHub
parent f5b06268b4
commit 0866d17f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -202,7 +202,7 @@ stop()
local addr=$(uci get dnsforwarder.@arguments[0].addr 2>/dev/null)
addr=${addr/:/#}
uci del_list dhcp.@dnsmasq[0].server=$addr 2>/dev/null
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto 2>/dev/null
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto 2>/dev/null
uci delete dhcp.@dnsmasq[0].noresolv 2>/dev/null
uci delete dhcp.@dnsmasq[0].serversfile 2>/dev/null
uci commit dhcp

View File

@ -139,14 +139,14 @@ stop_pdnsd() {
change_dns() {
uci delete dhcp.@dnsmasq[0].server >/dev/null 2>&1
uci add_list dhcp.@dnsmasq[0].server=127.0.0.1#5333
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto
uci set dhcp.@dnsmasq[0].noresolv=0
uci commit dhcp
}
revert_dns() {
uci del_list dhcp.@dnsmasq[0].server=127.0.0.1#5333 >/dev/null 2>&1
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto
uci set dhcp.@dnsmasq[0].noresolv=0
uci commit dhcp
}

View File

@ -133,14 +133,14 @@ EOF
change_dns() {
uci delete dhcp.@dnsmasq[0].server >/dev/null 2>&1
uci add_list dhcp.@dnsmasq[0].server=127.0.0.1#5333
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto
uci set dhcp.@dnsmasq[0].noresolv=0
uci commit dhcp
}
revert_dns() {
uci del_list dhcp.@dnsmasq[0].server=127.0.0.1#5333 >/dev/null 2>&1
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto
uci set dhcp.@dnsmasq[0].noresolv=0
uci commit dhcp
}
@ -203,4 +203,4 @@ restart(){
stop
start
/etc/init.d/dnsmasq restart && echo "DNSMASQ restart"
}
}