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'
21 set network.$cfg='interface'
22 set network.$cfg.ifname='$ifname'
23 set network.$cfg.proto='none'
31 set network.lan='interface'
32 set network.lan.ifname='$ifname'
33 set network.lan.type='bridge'
34 set network.lan.proto='static'
35 set network.lan.ipaddr='192.168.1.1'
36 set network.lan.netmask='255.255.255.0'
44 set network.wan='interface'
45 set network.wan.ifname='$ifname'
46 set network.wan.proto='dhcp'
56 set network.atm='atm-bridge'
57 set network.atm.unit='0'
58 set network.atm.vpi='$vpi'
59 set network.atm.vci='$vci'
60 set network.atm.encaps='$encaps'
61 set network.atm.payload='$payload'
62 set network.atm.fwannex='$annex'
63 set network.atm.annex='$annex'
64 set network.wan='interface'
65 set network.wan.ifname='nas0'
66 set network.wan.proto='pppoe'
67 set network.wan.username='foo'
68 set network.wan.password='bar'
76 set network.adsl='adsl-device'
77 set network.adsl.fwannex='$fwannex'
78 set network.adsl.annex='$annex'
82 set_interfaces_lan_wan
() {
86 set_interface_lan
"$lan_ifname"
87 set_interface_wan
"$wan_ifname"
96 set network.@switch[-1].name='$name'
97 set network.@switch[-1].reset='$reset'
98 set network.@switch[-1].enable_vlan='$enable'
107 add network switch_vlan
108 set network.@switch_vlan[-1].device='$device'
109 set network.@switch_vlan[-1].vlan='$vlan'
110 set network.@switch_vlan[-1].ports='$ports'
114 [ -e /etc
/config
/network
] && exit 0
118 touch /etc
/config
/network
120 set_interface_loopback
121 set_interface_lan
'eth0'
128 fwannex
=$
(lantiq_dsl_fwannex
)
131 board
=$
(lantiq_board_name
)
134 set_interface_lan
"eth0.1"
135 add_switch
"eth0" "1" "1"
136 add_switch_vlan
"eth0" "1" "1 2 3 4 5t"
140 # custom foo goes here
145 dsl
=$
(lantiq_soc_has_adsl
)
146 [ -z "$dsl" ] || set_atm_wan
"$vpi" "vci" "$encaps" "$payload" "$annex"
147 [ -z "$fwannex" ] || set_adsl
"$fwannex" "$annex"
This page took 0.047975 seconds and 5 git commands to generate.