3 # Copyright (C) 2012-2014 OpenWrt.org
6 [ -e /etc
/config
/network
] && exit 0
8 touch /etc
/config
/network
13 set network.lan='interface'
14 set network.lan.ifname='$ifname'
15 set network.lan.proto='dhcp'
16 set network.lan6='interface'
17 set network.lan6.ifname='@lan'
18 set network.lan6.proto='dhcpv6'
19 set network.lan6.reqprefix='no'
23 add_port_based_vlan
() {
28 add network switch_vlan
29 set network.@switch_vlan[-1].device='$device'
30 set network.@switch_vlan[-1].vlan='$vlan'
31 set network.@switch_vlan[-1].ports='$ports'
32 set network.@switch_vlan[-1].port_based='1'
36 .
/lib
/functions
/uci-defaults.sh
39 board
=$
(kirkwood_board_name
)
41 ucidef_set_interface_loopback
57 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
58 ucidef_add_switch
"switch0" "1" "0"
59 add_port_based_vlan
"switch0" "1" "0 1 2 3 5"
60 add_port_based_vlan
"switch0" "2" "4 6"
63 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
64 ucidef_add_switch
"switch0" "1" "0"
65 add_port_based_vlan
"switch0" "1" "0 1 2 3 5"
66 add_port_based_vlan
"switch0" "2" "4 6"
68 "guruplug-server-plus")
69 set_lan_dhcp
"eth0" "eth1"
76 ucidef_set_interface_lan
"eth0"