mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
inteno-netmodes: remove the unneeded script
This commit is contained in:
parent
960b7a262a
commit
d0c84e2ab3
1 changed files with 0 additions and 27 deletions
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
MTK=0
|
||||
[ "$(db -q get hw.board.hardware)" == "EX400" ] && MTK=1
|
||||
|
||||
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).1"
|
||||
link=$(cat /sys/class/net/${WANDEV:0:4}/operstate)
|
||||
fi
|
||||
|
||||
[ "$link" == "up" ] && action=add
|
||||
[ "$link" == "down" ] && action=remove
|
||||
[ -z "$action" ] && exit
|
||||
|
||||
wetif="$(uci -q get wireless.$(uci show wireless | grep 'mode=.*wet.*' | cut -d'.' -f2 | head -1).ifname)"
|
||||
|
||||
if uci -q get network.wan.ifname | grep -wq "$wetif"; then
|
||||
[ "$link" == "down" ] && return
|
||||
else
|
||||
[ "$link" == "up" ] && return
|
||||
fi
|
||||
|
||||
# trigger a fake hotplug net event
|
||||
INTERFACE=$WANDEV ACTION=$action /sbin/hotplug-call net
|
||||
Loading…
Add table
Reference in a new issue