inteno-netmodes: remove the unneeded script

This commit is contained in:
Sukru Senli 2018-01-20 12:57:03 +01:00
parent 960b7a262a
commit d0c84e2ab3

View file

@ -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