Modify

Opened 10 years ago

Closed 10 years ago

Last modified 22 months ago

#882 closed defect (fixed)

modification to netconfig for the wl500gP

Reported by: TheCompWiz Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version:
Keywords: netconfig vlan wl500gp Cc:

Description

2 changes... on line 31, where it adds values to the nvram array, add also the "productid"

($1 == "boardnum")
($1 == "boardtype") ($1 == "boardflags") ($1 == "productid") {

and line 58, add the following (after checking for boardtype == "0x042f")

# WL500gP
if (nvramproductid? == "WL500g.Premium") {

cvlan0ports? = "1 2 3 4 5*"
cvlan1ports? = "0 5"

}


Complete changes here


#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org

START=05

start() {

[ -e /etc/config/network ] && exit 0

mkdir -p /etc/config

(

if grep -E 'mtd0: 000(6|a)0000' /proc/mtd 2>&- >&-; then

# WGT634u
echo boardtype=wgt634u

else

strings /dev/mtdblock/3

fi

) | awk '
function p(cfgname, name) {

if (c[name] != "") print " option " cfgname " \"" c[name] "\""

}


BEGIN {

FS="="
clan_ifname?="eth0.0"
cwan_ifname?="eth0.1"
cvlan0ports?="1 2 3 4 5*"
cvlan1ports?="0 5"

}


($1 == "boardnum")
($1 == "boardtype") ($1 == "boardflags") ($1 == "productid") {

nvram[$1] = $2

}


END {

# v1 hardware
if (nvramboardtype? == "bcm94710dev") {

# Asus WL-500g
if (nvramboardnum? == "asusX") {

clan_ifname?="eth0 eth1" # FIXME
cwan_ifname?=""

}

}
if (nvramboardtype? == "bcm94710r4") {

# Toshiba WRC-1000
clan_ifname? = "eth0"
cwan_ifname? = "eth1"

}
if (nvramboardtype? == "wgt634u") {

cvlan0ports? = "0 1 2 3 5*"
cvlan1ports? = "4 5"

}

if ((nvramboardtype? == "0x0467")
(nvramboardtype? == "0x042f")) {

cvlan0ports? = "0 1 2 3 5*"
cvlan1ports? = "4 5"

}


# WL500gP
if (nvramproductid? == "WL500g.Premium") {

cvlan0ports? = "1 2 3 4 5*"
cvlan1ports? = "0 5"

}


# WAP54G

if ((nvramboardnum? == "2")

(nvramboardnum? == "1024")) {
clan_ifname?="eth0"
cwan_ifname?=""

}


print "#### VLAN configuration "
print "config switch eth0"
p("vlan0", "vlan0ports")
p("vlan1", "vlan1ports")
print ""
print ""
print "#### Loopback configuration"
print "config interface loopback"
print " option ifname \"lo\""
print " option proto static"
print " option ipaddr 127.0.0.1"
print " option netmask 255.0.0.0"
print ""
print ""
print "#### LAN configuration"
print "config interface lan"
print " option type bridge"
p("ifname", "lan_ifname")
print " option proto static"
print " option ipaddr 192.168.1.1"
print " option netmask 255.255.255.0"
print ""
print ""
print "#### WAN configuration"
print "config interface wan"
p("ifname", "wan_ifname")
print " option proto dhcp"

}' > /etc/config/network

}

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

fixed in [5287]

comment:2 Changed 22 months ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.