summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/ase/base-files/etc/board.d/02_network
blob: 2334d6c25b49ed2b242fbbf14e4eaf066b3a5109 (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
37
38
39
40
41
42
43
#!/bin/sh
#
# Copyright (C) 2011-2015 OpenWrt.org
#

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

board_config_update

annex="a"

lan_mac=""
wan_mac=""

board=$(board_name)

case "$board" in
allnet,all0333cj)
	annex="b"
	lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
	wan_mac=$(macaddr_add "$lan_mac" 1)
	ucidef_set_interface_lan 'eth0'
	;;
netgear,dgn1000b)
	annex="b"
	ucidef_set_interface_lan 'eth0'
	;;
*)
	ucidef_set_interface_lan 'eth0'
	;;
esac

lantiq_setup_dsl_helper "$annex"

[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"

board_config_flush

exit 0