From 90031ba97a89ab5bf5e1e7797e870f643e6d62b6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 13 Jul 2018 20:06:18 +0200 Subject: [PATCH] gluon-status-page: replace nixio with luaposix --- .../files/lib/gluon/status-page/view/status-page.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html index bf55eab6..2b6c7ac0 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html @@ -1,6 +1,6 @@ <%- - local fs = require 'nixio.fs' local ubus = require 'ubus' + local unistd = require 'posix.unistd' local util = require 'gluon.util' local translations = {} @@ -42,13 +42,13 @@ local function is_wireless(iface) while true do local pattern = '/sys/class/net/' .. iface .. '/lower_*' - local lower = fs.glob(pattern)() + local lower = util.glob(pattern)[1] if not lower then break end iface = lower:sub(pattern:len()) end - return fs.access('/sys/class/net/' .. iface .. '/wireless') ~= nil + return unistd.access('/sys/class/net/' .. iface .. '/wireless') ~= nil end local interfaces = get_interfaces() @@ -148,7 +148,7 @@ <% for _, iface in ipairs(interfaces) do local wireless = is_wireless(iface) - local address = fs.readfile('/sys/class/net/' .. iface .. '/address') + local address = util.readfile('/sys/class/net/' .. iface .. '/address') if address then %>

<%| iface %>