2 [ -e /etc/config/network ] && exit 0
5 if [ "$(/usr/bin/head -c4 /dev/mtdblock/1 | /usr/bin/tail -c3)" = "ELF" ]; then
9 strings /dev/mtdblock/3
13 if (c[name] != "") print name "=\"" c[name] "\""
19 c["lan_ifnames"]="vlan0 eth1"
21 c["wan_ifname"]="vlan1"
22 c["vlan0ports"]="1 2 3 4 5*"
26 ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") {
32 if (nvram["boardtype"] == "bcm4710dev") {
34 if (nvram["boardnum"] == "42") {
37 c["lan_ifnames"]="vlan2 eth2"
41 if (nvram["boardnum"] == "asusX") {
42 c["lan_ifnames"]="eth0 eth1 eth2" # FIXME
46 if (nvram["boardtype"] == "wgt634u") {
47 c["vlan0ports"] = "0 1 2 3 5*"
48 c["vlan1ports"] = "4 5"
50 if (nvram["boardtype"] == "0x0467") {
51 c["vlan0ports"] = "0 1 2 3 5*"
52 c["vlan1ports"] = "4 5"
56 if ((nvram["boardnum"] == "2") || \
57 (nvram["boardnum"] == "1024")) {
58 c["lan_ifnames"]="eth0 eth1"
62 print "#### VLAN configuration "
63 print "vlan0hwname=et0"
64 print "vlan1hwname=et0"
70 print "#### LAN configuration"
71 print "lan_proto=\"static\""
74 print "lan_ipaddr=\"192.168.1.1\""
75 print "# lan_dns=\"192.168.1.1\""
76 print "# lan_gateway=\"192.168.1.1\""
81 print "#### WAN configuration"
82 print "# wan_proto: WAN protocol, available protocols:"
83 print "# none: disable"
85 print "# static: Static IP"
86 print "# pppoe: PPP over Ethernet"
87 print "# pptp: Point-to-Point tunneling Protocol"
88 print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\""
89 print "# and {pppoe,pptp}ifname=\"" c["wan_ifname"] "\")"
91 print "wan_proto=dhcp"
93 print "# wan_ipaddr=\"192.168.0.2\""
94 print "# wan_netmask=\"255.255.255.0\""
95 print "# wan_gateway=\"192.168.0.1\""
96 print "# wan_dns=\"192.168.0.1\""
98 print "## PPP over Ethernet and PPTP"
99 print "# wan_ifname=\"ppp0\""
100 print "# pppoe_ifname=\"" c["wan_ifname"] "\""
101 print "# pptp_ifname=\"" c["wan_ifname"] "\""
102 print "# pptp_server_ip=\"192.168.0.1\""
104 ' > /etc/config/network