3 # Copyright (C) 2011 OpenWrt.org
6 set_interface_loopback
() {
8 set network.loopback='interface'
9 set network.loopback.ifname='lo'
10 set network.loopback.proto='static'
11 set network.loopback.ipaddr='127.0.0.1'
12 set network.loopback.netmask='255.0.0.0'
20 set network.lan='interface'
21 set network.lan.ifname='$ifname'
22 set network.lan.type='bridge'
23 set network.lan.proto='static'
24 set network.lan.ipaddr='192.168.1.1'
25 set network.lan.netmask='255.255.255.0'
33 set network.wan='interface'
34 set network.wan.ifname='$ifname'
35 set network.wan.proto='dhcp'
39 set_interfaces_lan_wan
() {
43 set_interface_lan
"$lan_ifname"
44 set_interface_wan
"$wan_ifname"
53 set network.@switch[-1].name='$name'
54 set network.@switch[-1].reset='$reset'
55 set network.@switch[-1].enable_vlan='$enable'
64 add network switch_vlan
65 set network.@switch_vlan[-1].device='$device'
66 set network.@switch_vlan[-1].vlan='$vlan'
67 set network.@switch_vlan[-1].ports='$ports'
71 [ -e /etc
/config
/network
] && exit 0
73 touch /etc
/config
/network
75 set_interface_loopback
79 board
=$
(ar71xx_board_name
)
84 set_interfaces_lan_wan
"eth1" "eth0"
85 add_switch
"switch0" "1" "1"
86 add_switch_vlan
"switch0" "1" "1 2 5"
91 set_interfaces_lan_wan
"eth1" "eth0"
92 add_switch
"switch0" "1" "1"
93 add_switch_vlan
"switch0" "1" "0 1 2 3 4"
103 set_interface_lan
"eth0"
111 set_interfaces_lan_wan
"eth1" "eth0"
130 set_interfaces_lan_wan
"eth0" "eth1"
131 add_switch
"eth0" "1" "1"
132 add_switch_vlan
"eth0" "1" "0 1 2 3 4"
136 set_interfaces_lan_wan
"eth0" "eth1"
This page took 0.056282 seconds and 5 git commands to generate.