Changeset 35617


Ignore:
Timestamp:
2013-02-16T13:37:24+01:00 (5 years ago)
Author:
hauke
Message:

brcm47xx: try to automatically detect if the wan port is at port 4 and not at port 0.

This should fix #13000.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx/base-files/etc/init.d/netconfig

    r35597 r35617  
    102102        } 
    103103 
    104         ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") || ($1 ~ /macaddr/) { 
     104        ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") || ($1 ~ /macaddr/) || \ 
     105         ($1 ~ /^vlan[0-9]{1,2}ports$/) { 
    105106                nvram[$1] = $2 
    106107        } 
    107108 
    108109        END { 
     110                if (((nvram["vlan0ports"] ~ /^0 1 2 3 8/ ) && (nvram["vlan1ports"] ~ /^4 8/ && (cpuport == "8"))) || \ 
     111                    ((nvram["vlan1ports"] ~ /^0 1 2 3 8/ ) && (nvram["vlan2ports"] ~ /^4 8/ && (cpuport == "8")))) { 
     112                        c["vlan0ports"] = "0 1 2 3 8" 
     113                        c["vlan1ports"] = "4 8" 
     114                } 
     115                if (((nvram["vlan0ports"] ~ /^0 1 2 3 5/ ) && (nvram["vlan1ports"] ~ /^4 5/ && (cpuport == "5"))) || \ 
     116                    ((nvram["vlan1ports"] ~ /^0 1 2 3 5/ ) && (nvram["vlan2ports"] ~ /^4 5/ && (cpuport == "5")))) { 
     117                        c["vlan0ports"] = "0 1 2 3 5" 
     118                        c["vlan1ports"] = "4 5" 
     119                } 
    109120                if ((model == "ASUS WL-HDD") || (model == "ASUS WL-300g") || (model == "Linksys WAP54G V1")) { 
    110121                        c["wan_ifname"] = "" 
Note: See TracChangeset for help on using the changeset viewer.