1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/sunxi/base-files/etc/uci-defaults/99-switch-config
2021-03-06 23:58:10 +01:00

47 lines
1.4 KiB
Text
Executable file

if [ -f "/etc/.lamobo-r1.dsa" ]; then
uci delete network.@switch_vlan[1]
uci delete network.@switch_vlan[0]
uci delete network.@switch[0]
uci set network.lan.ifname="wan"
uci set network.wan1.ifname="lan1"
uci set network.wan2.ifname="lan2"
uci set network.wan3.ifname="lan3"
uci set network.wan4.ifname="lan4"
else
uci delete network.@switch_vlan[0]
uci delete network.@switch_vlan[1]
uci add network switch_vlan
uci set network.@switch_vlan[0].vlan=5
uci set network.@switch_vlan[0].ports="8 3"
uci set network.@switch_vlan[0].device="switch0"
uci add network switch_vlan
uci set network.@switch_vlan[1].vlan=1
uci set network.@switch_vlan[1].ports="8t 4"
uci set network.@switch_vlan[1].device="switch0"
uci add network switch_vlan
uci set network.@switch_vlan[2].vlan=2
uci set network.@switch_vlan[2].ports="8t 0"
uci set network.@switch_vlan[2].device="switch0"
uci add network switch_vlan
uci set network.@switch_vlan[3].vlan=3
uci set network.@switch_vlan[3].ports="8t 1"
uci set network.@switch_vlan[3].device="switch0"
uci add network switch_vlan
uci set network.@switch_vlan[4].vlan=4
uci set network.@switch_vlan[4].ports="8t 2"
uci set network.@switch_vlan[4].device="switch0"
uci set network.lan.ifname="eth0"
uci set network.wan1.ifname="eth0.1"
uci set network.wan2.ifname="eth0.2"
uci set network.wan3.ifname="eth0.3"
uci set network.wan4.ifname="eth0.4"
fi
uci commit
exit 0