15e51d88f2f840966f5ab310cc21f96b1c02e7e6
[openwrt/staging/wigyori.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 "cisco,on100")
15 ucidef_set_interface_lan "eth0 eth1"
16 ;;
17 "cloudengines,pogoe02"|\
18 "cloudengines,pogoplugv4"|\
19 "iom,iconnect-1.1"|\
20 "iom,ix2-200"|\
21 "raidsonic,ib-nas62x0"|\
22 "seagate,dockstar"|\
23 "seagate,goflexhome"|\
24 "seagate,goflexnet")
25 ucidef_set_interface_lan "eth0" "dhcp"
26 ;;
27 "linksys,audi"|\
28 "linksys,viper")
29 ucidef_add_switch "switch0" \
30 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" "6@eth1"
31 ;;
32 "zyxel,nsa310b"|\
33 "zyxel,nsa325")
34 ucidef_set_interface_lan "eth0" "dhcp"
35 ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
36 ;;
37 *)
38 ucidef_set_interface_lan "eth0"
39 ;;
40 esac
41
42 board_config_flush
43
44 exit 0