35d735f9dbf4515ce51071432de487296f23f644
[oweals/openwrt.git] / target / linux / kirkwood / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2012-2015 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7 . /lib/functions/system.sh
8 . /lib/kirkwood.sh
9
10 board_config_update
11
12 board=$(kirkwood_board_name)
13
14 case "$board" in
15 "dockstar"|\
16 "goflexhome"|\
17 "goflexnet"|\
18 "ib62x0"|\
19 "iconnect"|\
20 "nsa310s"|\
21 "pogo_e02"|\
22 "sheevaplug"|\
23 "sheevaplug-esata")
24         ucidef_set_interface_lan "eth0" "dhcp"
25         ;;
26 "guruplug-server-plus")
27         ucidef_set_interface_lan "eth0 eth1" "dhcp"
28         ;;
29 "linksys-audi"|\
30 "linksys-viper")
31         ucidef_add_switch "switch0" \
32                 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" "6@eth1"
33         ;;
34 "nsa310b"|"nsa325")
35         ucidef_set_interface_lan "eth0" "dhcp"
36         ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
37         ;;
38 *)
39         ucidef_set_interface_lan "eth0"
40         ;;
41 esac
42
43 board_config_flush
44
45 exit 0