summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2014-02-25 17:40:04 +0000
committerGabor Juhos <juhosg@openwrt.org>2014-02-25 17:40:04 +0000
commite9c80a1224213a1bb33f56d329c6d277b29cb4c5 (patch)
tree5f56f1f54a0b6bb2eca7dc15ae2616f0066e3e25 /target/linux
parentccccc104b3603d903a591c21cbea211ab757fbba (diff)
downloadmtk-20170518-e9c80a1224213a1bb33f56d329c6d277b29cb4c5.zip
mtk-20170518-e9c80a1224213a1bb33f56d329c6d277b29cb4c5.tar.gz
mtk-20170518-e9c80a1224213a1bb33f56d329c6d277b29cb4c5.tar.bz2
ar71xx: fix failsafe acces on several devices
The ar71xx platform always uses the eth0 interface to provide access to the device in failsafe mode. Due to this, failsafe access is broken on devices where the LAN ports are connected to the 'eth1' interface. Update the relevant script to correctly set the ifname variable for these devices. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 39752
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx36
1 files changed, 35 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
index 8611dce..31a2dd7 100644
--- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
+++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
@@ -7,7 +7,41 @@
. /lib/ar71xx.sh
set_preinit_iface() {
- ifname=eth0
+ case $(ar71xx_board_name) in
+ alfa-ap96 |\
+ alfa-nx |\
+ ap135-020 |\
+ ap136-020 |\
+ ap83 |\
+ archer-c7 |\
+ dir-505-a1 |\
+ jwap003 |\
+ pb42 |\
+ pb44 |\
+ rb-433 |\
+ rb-433u |\
+ rb-435g |\
+ rb-450 |\
+ rb-450g |\
+ routerstation |\
+ routerstation-pro |\
+ tl-mr3420-v2 |\
+ tl-wdr4900-v2 |\
+ tl-wr1043nd-v2 |\
+ tl-wr710n |\
+ tl-wr720n-v3 |\
+ tl-wr841n-v8 |\
+ tl-wr842n-v2 |\
+ wnr2000-v3 |\
+ wnr2200 |\
+ wnr612-v2 |\
+ wpe72)
+ ifname=eth1
+ ;;
+ *)
+ ifname=eth0
+ ;;
+ esac
}
boot_hook_add preinit_main set_preinit_iface