1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Doesn't remove wan & wan6 from firewall if they exist in network

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-04-07 19:29:45 +02:00
parent 2093055c7f
commit 8fd58258c9

View file

@ -18,11 +18,22 @@ fi
if [ "$(uci -q get firewall.@zone[1].name)" = "wan" ]; then
uci -q batch <<-EOF >/dev/null
rename firewall.@zone[1]="zone_wan"
del_list firewall.zone_wan.network="wan"
commit firewall
EOF
fi
if [ "$(uci -q show firewall.zone_wan | grep wan6)" != "" ] && [ "$(uci -q get network.wan6)" = "" ]; then
uci -q batch <<-EOF >/dev/null
del_list firewall.zone_wan.network="wan6"
commit firewall
EOF
fi
if [ "$(uci -q show firewall.zone_wan | grep wan)" != "" ] && [ "$(uci -q get network.wan)" = "" ]; then
uci -q batch <<-EOF >/dev/null
del_list firewall.zone_wan.network="wan"
commit firewall
EOF
fi
if [ "$(uci -q get firewall.@zone[0].name)" = "lan" ]; then
uci -q batch <<-EOF >/dev/null
rename firewall.@zone[0]="zone_lan"