mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix network for some devices
This commit is contained in:
parent
9e0fbd23a0
commit
2f51c505b3
1 changed files with 4 additions and 3 deletions
|
@ -86,8 +86,7 @@ elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/c
|
|||
lanif="wan"
|
||||
elif [ -d /sys/class/net/lan ] || [ -n "$(ip link | grep ' lan')" ]; then
|
||||
lanif="lan"
|
||||
elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ]; then
|
||||
# lanif="eth1.2"
|
||||
elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d '/sys/class/net/eth1.5' ]; then
|
||||
lanif="eth1.5"
|
||||
uci -q batch <<-EOF
|
||||
set network.@switch_vlan[0]=switch_vlan
|
||||
|
@ -95,7 +94,7 @@ elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ]; then
|
|||
set network.@switch_vlan[0].vlan=1
|
||||
set network.@switch_vlan[0].vid=1
|
||||
set network.@switch_vlan[0].ports='3 5t'
|
||||
set network.@switch_vlan[1]=switch_vlan
|
||||
add network switch_vlan
|
||||
set network.@switch_vlan[1].device='switch0'
|
||||
set network.@switch_vlan[1].vlan=2
|
||||
set network.@switch_vlan[1].vid=2
|
||||
|
@ -116,6 +115,8 @@ elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ]; then
|
|||
set network.@switch_vlan[4].vid=5
|
||||
set network.@switch_vlan[4].ports='4 6t'
|
||||
EOF
|
||||
elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d /sys/class/net/eth1 ]; then
|
||||
lanif="eth1"
|
||||
fi
|
||||
uci -q batch <<-EOF
|
||||
set network.lan=interface
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue