modules/admin-full: fix crash on network interface overview page
This commit is contained in:
parent
175cd0342f
commit
382a33f40a
1 changed files with 3 additions and 0 deletions
|
@ -86,8 +86,11 @@ end
|
|||
hwaddr = s:option(DummyValue, "_hwaddr",
|
||||
translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"),
|
||||
translate("Hardware Address"))
|
||||
|
||||
function hwaddr.cfgvalue(self, section)
|
||||
local ix = self.map:get(section, "ifname") or ""
|
||||
ix = (type(ix) == "table") and ix[1] or ix
|
||||
|
||||
local mac = fs.readfile("/sys/class/net/" .. ix .. "/address")
|
||||
|
||||
if not mac then
|
||||
|
|
Loading…
Reference in a new issue