diff options
author | Steven Barth <steven@midlink.org> | 2008-09-18 14:51:04 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-09-18 14:51:04 +0000 |
commit | d87d01a24bb5dba7755d054e400ea861ae95a96c (patch) | |
tree | 6fac946805fa2942da8e06180592bb01a61da256 /modules/admin-mini/luasrc | |
parent | 6785c3ed4b237850c8f577e4a8be4e393f6095fb (diff) |
admin-mini: Merge MAC-Address detection from admin-full
Diffstat (limited to 'modules/admin-mini/luasrc')
-rw-r--r-- | modules/admin-mini/luasrc/model/cbi/mini/network.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/admin-mini/luasrc/model/cbi/mini/network.lua b/modules/admin-mini/luasrc/model/cbi/mini/network.lua index e4dd2caec..ccb5dac89 100644 --- a/modules/admin-mini/luasrc/model/cbi/mini/network.lua +++ b/modules/admin-mini/luasrc/model/cbi/mini/network.lua @@ -36,7 +36,9 @@ hwaddr = s:option(DummyValue, "_hwaddr", translate("network_interface_hwaddr"), translate("network_interface_hwaddr_desc")) function hwaddr.cfgvalue(self, section) local ix = self.map:get(section, "ifname") or "" - return luci.fs.readfile("/sys/class/net/" .. ix .. "/address") or "n/a" + return luci.fs.readfile("/sys/class/net/" .. ix .. "/address") + or luci.util.exec("ifconfig " .. ix):match(" ([A-F0-9:]+)%s*\n") + or "n/a" end |