bcm63xx: setup network config through uci-defaults
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / base-files / etc / uci-defaults / network
1 #!/bin/sh
2 #
3 # Copyright (C) 2012 OpenWrt.org
4 #
5
6 [ -e /etc/config/network ] && exit 0
7
8 touch /etc/config/network
9
10 . /lib/functions/uci-defaults.sh
11 . /lib/brcm63xx.sh
12
13 ucidef_set_interface_loopback
14
15 case "$board_name" in
16
17 96348A-122 |\
18 96358-502V |\
19 AW4139 |\
20 CPVA642 |\
21 CT536_CT5621 |\
22 D-4P-W |\
23 SPW500V |\
24 V2110)
25 ucidef_set_interface_lan "eth0"
26 ;;
27
28 DVG3810BN)
29 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
30 ucidef_add_switch "eth1" "1" "1"
31 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
32 ;;
33
34 *)
35 ucidef_set_interfaces_lan_wan "eth1" "eth0"
36 ;;
37
38 esac
39
40 uci commit network
41
42 exit 0