2 [ -e /etc
/config
/network
] && exit 0
6 if [ "$(/usr/bin/head -c4 /dev/mtdblock/1 | /usr/bin/tail -c3)" = "ELF" ]; then
10 strings /dev
/mtdblock
/3
14 if (c[name] != "") print name "=\"" c[name] "\""
20 c["lan_ifnames"]="vlan0 eth1"
22 c["wan_ifname"]="vlan1"
23 c["vlan0ports"]="1 2 3 4 5*"
27 ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") {
33 if (nvram["boardtype"] == "bcm4710dev") {
35 if (nvram["boardnum"] == "42") {
38 c["lan_ifnames"]="vlan2 eth2"
42 if (nvram["boardnum"] == "asusX") {
43 c["lan_ifnames"]="eth0 eth1 eth2" # FIXME
47 if (nvram["boardtype"] == "wgt634u") {
48 c["vlan0ports"] = "0 1 2 3 5*"
49 c["vlan1ports"] = "4 5"
51 if (nvram["boardtype"] == "0x0467") {
52 c["vlan0ports"] = "0 1 2 3 5*"
53 c["vlan1ports"] = "4 5"
57 if ((nvram["boardnum"] == "2") || \
58 (nvram["boardnum"] == "1024")) {
59 c["lan_ifnames"]="eth0 eth1"
63 print "#### VLAN configuration "
64 print "vlan0hwname=et0"
65 print "vlan1hwname=et0"
71 print "#### LAN configuration"
72 print "lan_proto=\"static\""
75 print "lan_ipaddr=\"192.168.1.1\""
76 print "# lan_dns=\"192.168.1.1\""
77 print "# lan_gateway=\"192.168.1.1\""
82 print "#### WAN configuration"
83 print "# wan_proto: WAN protocol, available protocols:"
84 print "# none: disable"
86 print "# static: Static IP"
87 print "# pppoe: PPP over Ethernet"
88 print "# pptp: Point-to-Point tunneling Protocol"
89 print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\""
90 print "# and {pppoe,pptp}ifname=\"" c["wan_ifname"] "\")"
92 print "wan_proto=dhcp"
94 print "# wan_ipaddr=\"192.168.0.2\""
95 print "# wan_netmask=\"255.255.255.0\""
96 print "# wan_gateway=\"192.168.0.1\""
97 print "# wan_dns=\"192.168.0.1\""
99 print "## PPP over Ethernet and PPTP"
100 print "# wan_ifname=\"ppp0\""
101 print "# pppoe_ifname=\"" c["wan_ifname"] "\""
102 print "# pptp_ifname=\"" c["wan_ifname"] "\""
103 print "# pptp_server_ip=\"192.168.0.1\""
105 ' > /etc
/config
/network
This page took 0.044838 seconds and 5 git commands to generate.