use uci commit written to openwrt flash
This commit is contained in:
@@ -672,7 +672,7 @@ stop_iptables(){
|
|||||||
#移除dnsmasq转发规则
|
#移除dnsmasq转发规则
|
||||||
[ "$dns_redir" = "已开启" ] && {
|
[ "$dns_redir" = "已开启" ] && {
|
||||||
uci del dhcp.@dnsmasq[-1].server >/dev/null 2>&1
|
uci del dhcp.@dnsmasq[-1].server >/dev/null 2>&1
|
||||||
uci delete dhcp.@dnsmasq[0].cachesize >/dev/null 2>&1
|
uci commit dhcp >/dev/null 2>&1
|
||||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -858,6 +858,7 @@ afstart(){
|
|||||||
uci del dhcp.@dnsmasq[-1].server >/dev/null 2>&1
|
uci del dhcp.@dnsmasq[-1].server >/dev/null 2>&1
|
||||||
uci delete dhcp.@dnsmasq[0].resolvfile 2>/dev/null
|
uci delete dhcp.@dnsmasq[0].resolvfile 2>/dev/null
|
||||||
uci add_list dhcp.@dnsmasq[0].server=127.0.0.1#$dns_port > /dev/null 2>&1
|
uci add_list dhcp.@dnsmasq[0].server=127.0.0.1#$dns_port > /dev/null 2>&1
|
||||||
|
uci commit dhcp >/dev/null 2>&1
|
||||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user