mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
inteno-netmodes: get wan device from db
This commit is contained in:
parent
2f40567ff4
commit
85b0ba1605
2 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ ps | grep hotplug | grep button && exit
|
|||
MTK=0
|
||||
[ "$(db -q get hw.board.hardware)" == "EX400" ] && MTK=1
|
||||
|
||||
WANDEV="$(uci get layer2_interface_ethernet.Wan.ifname)"
|
||||
WANDEV="$(db -q get hw.board.ethernetWanPort).1"
|
||||
[ $MTK -eq 1 ] && WANDEV="eth0.2"
|
||||
|
||||
[ "$INTERFACE" != "$WANDEV" ] && exit
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if [ $MTK -eq 1 ]; then
|
|||
WANDEV="eth0.2"
|
||||
link=$(swconfig dev switch0 port 0 get link | awk '{print$2}' | cut -d':' -f2)
|
||||
else
|
||||
WANDEV="$(db -q get hw.board.ethernetWanPort)"
|
||||
WANDEV="$(db -q get hw.board.ethernetWanPort).1"
|
||||
link=$(cat /sys/class/net/${WANDEV:0:4}/operstate)
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue