treewide: remove execute bit and shebang from board.d files
[openwrt/openwrt.git] / target / linux / lantiq / ase / base-files / etc / board.d / 02_network
1 #
2 # Copyright (C) 2011-2015 OpenWrt.org
3 #
4
5 . /lib/functions/uci-defaults.sh
6 . /lib/functions/system.sh
7 . /lib/functions/lantiq.sh
8
9 lantiq_setup_interfaces()
10 {
11 local board="$1"
12
13 case "$board" in
14 *)
15 ucidef_set_interface_lan 'eth0'
16 ;;
17 esac
18 }
19
20 lantiq_setup_dsl()
21 {
22 local board="$1"
23 local annex="b"
24
25 case "$board" in
26 esac
27
28 lantiq_setup_dsl_helper "$annex"
29 }
30
31 lantiq_setup_macs()
32 {
33 local board="$1"
34 local lan_mac=""
35 local wan_mac=""
36
37 case "$board" in
38 allnet,all0333cj)
39 lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
40 wan_mac=$(macaddr_add "$lan_mac" 1)
41 ;;
42 esac
43
44 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
45 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"
46 }
47
48 board_config_update
49 board=$(board_name)
50 lantiq_setup_interfaces $board
51 lantiq_setup_dsl $board
52 lantiq_setup_macs $board
53 board_config_flush
54
55 exit 0