549d232df936bae899df32e2c3109ea9e11a4de8
[openwrt/staging/chunkeey.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
9 board_config_update
10
11 board=$(board_name)
12
13 case "$board" in
14 "dockstar"|\
15 "goflexhome"|\
16 "goflexnet"|\
17 "ib62x0"|\
18 "iconnect"|\
19 "pogo_e02")
20 ucidef_set_interface_lan "eth0" "dhcp"
21 ;;
22 "linksys-audi"|\
23 "linksys-viper")
24 ucidef_add_switch "switch0" \
25 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" "6@eth1"
26 ;;
27 "nsa310b"|"nsa325")
28 ucidef_set_interface_lan "eth0" "dhcp"
29 ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
30 ;;
31 "on100")
32 ucidef_set_interface_lan "eth0 eth1"
33 ;;
34 *)
35 ucidef_set_interface_lan "eth0"
36 ;;
37 esac
38
39 board_config_flush
40
41 exit 0