summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
blob: 9351ffd4924fe29540bf5cbd6b2aeb6e5c925960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
set_preinit_iface() {
	case $(board_name) in
	smartrg,sdg-8622|\
	smartrg,sdg-8632)
		ip link set lan up
		ifname=lan
		;;
	cudy,tr3000-v1|\
	glinet,gl-mt3000)
		ip link set eth1 up
		ifname=eth1
		;;
	cudy,re3000-v1|\
	ubnt,unifi-6-lr|\
	zyxel,nwa50ax-pro)
		ip link set eth0 up
		ifname=eth0
		;;
	xiaomi,mi-router-ax3000t|\
	xiaomi,mi-router-ax3000t-ubootmod|\
	xiaomi,mi-router-wr30u-stock|\
	xiaomi,mi-router-wr30u-ubootmod|\
	xiaomi,redmi-router-ax6000-stock|\
	xiaomi,redmi-router-ax6000-ubootmod)
		ip link set eth0 up
		ifname=lan4
		;;
	*)
		ip link set eth0 up
		ifname=lan1
		;;
	esac
}

boot_hook_add preinit_main set_preinit_iface