2eca4f2a77a460d52e11e045c3ae452046346b48
[openwrt/staging/mkresin.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 96328avng |\
18 963281TAN |\
19 96348A-122 |\
20 96358-502V |\
21 AW4339U |\
22 CPVA642 |\
23 CT536_CT5621 |\
24 D-4P-W |\
25 SPW303V |\
26 SPW500V |\
27 V2110 |\
28 96348W3)
29 ucidef_set_interface_lan "eth0"
30 ;;
31
32 AW4139)
33 ucidef_set_interface_lan "eth0.1"
34 ucidef_add_switch "eth0" "1" "1"
35 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5t"
36 ;;
37
38 DVG3810BN)
39 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
40 ucidef_add_switch "eth1" "1" "1"
41 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
42 ;;
43
44 *)
45 ucidef_set_interfaces_lan_wan "eth1" "eth0"
46 ;;
47
48 esac
49
50 uci commit network
51
52 exit 0