gluon-mesh-batman-adv: fix network.mesh_inferfaces announce field with new netifd
This commit is contained in:
parent
9510d03b8b
commit
354508752c
@ -1,14 +1,14 @@
|
||||
require 'ubus'
|
||||
|
||||
local conn = ubus.connect()
|
||||
local list = util.exec('batctl if')
|
||||
|
||||
local interfaces = {}
|
||||
for _, line in ipairs(util.split(list)) do
|
||||
local ifname = line:match('^(.-):')
|
||||
if ifname ~= nil then
|
||||
local status = conn:call("network.device", "status", { name = ifname })
|
||||
table.insert(interfaces, status['macaddr'])
|
||||
pcall(
|
||||
function()
|
||||
table.insert(interfaces, util.trim(fs.readfile('/sys/class/net/' .. ifname .. '/address')))
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user