2 # Copyright (C) 2006 OpenWrt.org
4 [ -e /etc
/config
/network
] && exit 0
9 if grep 'mtd0: 00060000' /proc
/mtd
2>&- >&-; then
11 echo boardtype
=wgt634u
13 strings /dev
/mtdblock
/3
16 function p(cfgname, name) {
17 if (c[name] != "") print " option " cfgname " \"" c[name] "\""
23 c["lan_ifnames"]="eth0.0 wl0"
25 c["wan_ifname"]="eth0.1"
26 c["vlan0ports"]="1 2 3 4 5*"
30 ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") {
36 if (nvram["boardtype"] == "bcm94710dev") {
38 if (nvram["boardnum"] == "asusX") {
39 c["lan_ifnames"]="eth0 eth1 wl0" # FIXME
43 if (nvram["boardtype"] == "wgt634u") {
44 c["vlan0ports"] = "0 1 2 3 5*"
45 c["vlan1ports"] = "4 5"
46 c["lan_ifnames"] = "eth0.0 ath0"
48 if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) {
49 c["vlan0ports"] = "0 1 2 3 5*"
50 c["vlan1ports"] = "4 5"
54 if ((nvram["boardnum"] == "2") || \
55 (nvram["boardnum"] == "1024")) {
56 c["lan_ifnames"]="eth0 wl0"
60 print "#### VLAN configuration "
61 print "config switch eth0"
62 p("vlan0", "vlan0ports")
63 p("vlan1", "vlan1ports")
66 print "#### LAN configuration"
67 print "config interface lan"
68 print " option type bridge"
69 p("ifnames", "lan_ifnames")
70 print " option proto static"
71 print " option ipaddr 192.168.1.1"
72 print " option netmask 255.255.255.0"
75 print "#### WAN configuration"
76 print "config interface wan"
77 p("ifname", "wan_ifname")
78 print " option proto dhcp"
80 ' > /etc
/config
/network
This page took 0.051897 seconds and 5 git commands to generate.