mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix on OMR-DSCP when importing previous config
This commit is contained in:
parent
086c13516f
commit
fb3cd8be2a
1 changed files with 4 additions and 0 deletions
|
@ -130,6 +130,9 @@ _add_fwmark_chain() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_remove_old_ipset_dnsmasq() {
|
||||||
|
[ -n "$(uci -q get dhcp.${1}.name | grep omr)" ] && uci -q delete dhcp.$1
|
||||||
|
}
|
||||||
_remove_ipset_dnsmasq() {
|
_remove_ipset_dnsmasq() {
|
||||||
[ -n "$(echo $1 | grep omr_dscp)" ] && uci -q delete dhcp.$1
|
[ -n "$(echo $1 | grep omr_dscp)" ] && uci -q delete dhcp.$1
|
||||||
}
|
}
|
||||||
|
@ -151,6 +154,7 @@ _cleanup() {
|
||||||
uci -q del dhcp.@dnsmasq[0].ipset
|
uci -q del dhcp.@dnsmasq[0].ipset
|
||||||
config_load dhcp
|
config_load dhcp
|
||||||
config_foreach _remove_ipset_dnsmasq
|
config_foreach _remove_ipset_dnsmasq
|
||||||
|
config_foreach _remove_old_ipset_dnsmasq
|
||||||
config_load firewall
|
config_load firewall
|
||||||
config_foreach _remove_rules
|
config_foreach _remove_rules
|
||||||
uci -q commit dhcp
|
uci -q commit dhcp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue