Changeset 9810


Ignore:
Timestamp:
Apr 11, 2013, 3:36:22 PM (6 years ago)
Author:
jow
Message:

modules/admin-full: attempt to determine switch cpu port from /proc/switch/eth0/cpuport in order to properly support newer broadcom models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • luci/trunk/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua

    r9417 r9810  
    1515m = Map("network", translate("Switch"), translate("The network ports on this device can be combined to several <abbr title=\"Virtual Local Area Network\">VLAN</abbr>s in which computers can communicate directly with each other. <abbr title=\"Virtual Local Area Network\">VLAN</abbr>s are often used to separate different network segments. Often there is by default one Uplink port for a connection to the next greater network like the internet and other ports for a local network."))
    1616
     17local fs = require "nixio.fs"
    1718local switches = { }
    1819
     
    2930        local num_vlans   = 16
    3031        local num_ports   = 6
    31         local cpu_port    = 5
     32        local cpu_port    = tonumber(fs.readfile("/proc/switch/eth0/cpuport") or 5)
    3233
    3334        local switch_title
Note: See TracChangeset for help on using the changeset viewer.