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
17 if (c[name] != "") print name "=\"" c[name] "\""
23 c["lan_ifnames"]="vlan0 eth1"
25 c["wan_ifname"]="vlan1"
26 c["vlan0ports"]="1 2 3 4 5*"
30 ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") {
36 if (nvram["boardtype"] == "bcm94710dev") {
38 if (nvram["boardnum"] == "42") {
41 c["lan_ifnames"]="vlan2 eth2"
45 if (nvram["boardnum"] == "asusX") {
46 c["lan_ifnames"]="eth0 eth1 eth2" # FIXME
50 if (nvram["boardtype"] == "wgt634u") {
51 c["vlan0ports"] = "0 1 2 3 5*"
52 c["vlan1ports"] = "4 5"
53 c["lan_ifnames"] = "vlan0 ath0"
55 if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) {
56 c["vlan0ports"] = "0 1 2 3 5*"
57 c["vlan1ports"] = "4 5"
61 if ((nvram["boardnum"] == "2") || \
62 (nvram["boardnum"] == "1024")) {
63 c["lan_ifnames"]="eth0 eth1"
67 print "#### VLAN configuration "
68 print "vlan0hwname=et0"
69 print "vlan1hwname=et0"
75 print "#### LAN configuration"
76 print "lan_proto=\"static\""
79 print "lan_ipaddr=\"192.168.1.1\""
80 print "lan_netmask=\"255.255.255.0\""
81 print "# lan_dns=\"192.168.1.1\""
82 print "# lan_gateway=\"192.168.1.1\""
87 print "#### WAN configuration"
88 print "# wan_proto: WAN protocol, available protocols:"
89 print "# none: disable"
91 print "# static: Static IP"
92 print "# pppoe: PPP over Ethernet"
93 print "# pptp: Point-to-Point tunneling Protocol"
94 print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\""
96 print "wan_proto=dhcp"
98 print "wan_device=\"" c["wan_ifname"] "\""
99 print "# wan_ipaddr=\"192.168.0.2\""
100 print "# wan_netmask=\"255.255.255.0\""
101 print "# wan_gateway=\"192.168.0.1\""
102 print "# wan_dns=\"192.168.0.1\""
104 print "## PPP over Ethernet and PPTP"
105 print "# wan_ifname=\"ppp0\""
106 print "# ppp_username=\"my_username\""
107 print "# ppp_passwd=\"my_password\""
108 print "# pptp_server_ip=\"192.168.0.1\""
110 ' > /etc
/config
/network
This page took 0.060734 seconds and 5 git commands to generate.