a86c57117dd7eed715041005be5c31cfed780346
[openwrt/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
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 "zyxel,nsa310s")
26 ucidef_set_interface_lan "eth0" "dhcp"
27 ;;
28 "linksys,audi"|\
29 "linksys,viper")
30 ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
31 ucidef_set_interface_macaddr "wan" $( mtd_get_mac_ascii u_env eth1addr )
32 ;;
33 "zyxel,nsa310b"|\
34 "zyxel,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