prometheus-node-exporter-lua: fix wifi
The "get_wifi_interfaces" function is not returning the wifi interface names. This causes the bug #14625. Fix the "get_wifi_interfaces" function. Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
parent
ac4cbab7d8
commit
495cdbb39d
2 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=prometheus-node-exporter-lua
|
PKG_NAME:=prometheus-node-exporter-lua
|
||||||
PKG_VERSION:=2021.01.27
|
PKG_VERSION:=2021.02.15
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
||||||
|
|
|
@ -6,9 +6,9 @@ local function get_wifi_interfaces()
|
||||||
local status = u:call("network.wireless", "status", {})
|
local status = u:call("network.wireless", "status", {})
|
||||||
local interfaces = {}
|
local interfaces = {}
|
||||||
|
|
||||||
for dev, dev_table in pairs(status) do
|
for _, dev_table in pairs(status) do
|
||||||
for _, intf in ipairs(dev_table['interfaces']) do
|
for _, intf in ipairs(dev_table['interfaces']) do
|
||||||
table.insert(interfaces, intf['config']['ifname'])
|
table.insert(interfaces, intf['ifname'])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue