From 9e1383dd40ba49e54cddedd04938c55609cc1f08 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 16 Jan 2015 21:39:26 +0100 Subject: [PATCH] luci-mod-admin-full: directly require luci.version and fetch uname with library call Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/admin_status/index.htm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm index 6fca1c6b0f..5f4539c616 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm @@ -15,6 +15,7 @@ You may obtain a copy of the License at local fs = require "nixio.fs" local util = require "luci.util" local stat = require "luci.tools.status" + local ver = require "luci.version" local has_ipv6 = fs.access("/proc/net/ipv6_route") local has_dhcp = fs.access("/etc/config/dhcp") @@ -22,6 +23,7 @@ You may obtain a copy of the License at local sysinfo = luci.util.ubus("system", "info") or { } local boardinfo = luci.util.ubus("system", "board") or { } + local unameinfo = nixio.uname() or { } local meminfo = sysinfo.memory or { total = 0, @@ -564,10 +566,10 @@ You may obtain a copy of the License at <%:Hostname%><%=luci.sys.hostname() or "?"%> <%:Model%><%=pcdata(boardinfo.model or boardinfo.system or "?")%> <%:Firmware Version%> - <%=pcdata(luci.version.distname)%> <%=pcdata(luci.version.distversion)%> / - <%=pcdata(luci.version.luciname)%> (<%=pcdata(luci.version.luciversion)%>) + <%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> / + <%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>) - <%:Kernel Version%><%=luci.sys.exec("uname -r")%> + <%:Kernel Version%><%=unameinfo.release or "?"%> <%:Local Time%>- <%:Uptime%>- <%:Load Average%>- -- 2.30.2