summaryrefslogtreecommitdiff
path: root/target/linux/mediatek/base-files/etc/board.d/02_network
blob: e071ab27a0f2a0e92b9b5ce785f532413222767b (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
#!/bin/sh

. /lib/functions.sh
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh

mediatek_setup_interfaces()
{
	local board="$1"

	case $board in
	'bananapi,bpi-r2' | \
	'mediatek,mt7623-rfb-emmc' | \
	'mediatek,mt7623-rfb-nand-ephy')
		ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
		ucidef_set_interface_wan eth1
		;;
	'mediatek,mt7623-rfb-nand')
		ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
		ucidef_set_interface_wan wan
		;;
	esac
}

board_config_update
board=$(board_name)
mediatek_setup_interfaces $board
board_config_flush

exit 0