65ce439545d3ea0edcc77f5b42758e1a3809a94b
[oweals/openwrt.git] / target / linux / ath79 / nand / base-files / etc / board.d / 02_network
1 #!/bin/sh
2
3 . /lib/functions/system.sh
4 . /lib/functions/uci-defaults.sh
5
6 ath79_setup_interfaces()
7 {
8         local board="$1"
9
10         case "$board" in
11         *)
12                 ucidef_set_interfaces_lan_wan "eth0" "eth1"
13                 ;;
14         esac
15 }
16
17 ath79_setup_macs()
18 {
19         local board="$1"
20
21         case "$board" in
22         esac
23
24         [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
25         [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
26         [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
27 }
28
29 board_config_update
30 board=$(board_name)
31 ath79_setup_interfaces $board
32 ath79_setup_macs $board
33 board_config_flush
34
35 exit 0