7998efc2a0e37908d5e5d5405d87330d225ce155
[openwrt/staging/rmilecki.git] / target / linux / lantiq / falcon / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2011-2015 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7 . /lib/functions/system.sh
8 . /lib/functions/lantiq.sh
9
10 lantiq_setup_interfaces()
11 {
12 local board="$1"
13
14 case "$board" in
15 *)
16 ucidef_set_interface_lan 'eth0'
17 ;;
18 esac
19 }
20
21 lantiq_setup_dsl()
22 {
23 local board="$1"
24 local annex="a"
25
26 case "$board" in
27 esac
28
29 lantiq_setup_dsl_helper "$annex"
30 }
31
32 lantiq_setup_macs()
33 {
34 local board="$1"
35 local lan_mac=""
36 local wan_mac=""
37
38 case "$board" in
39 esac
40
41 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
42 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"
43 }
44
45 board_config_update
46 board=$(board_name)
47 lantiq_setup_interfaces $board
48 lantiq_setup_dsl $board
49 lantiq_setup_macs $board
50 board_config_flush
51
52 exit 0