From 12f0c3cdd6336e79360846bd233189f2cd281fce Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Wed, 1 Dec 2010 12:31:07 +0000 Subject: [PATCH] modules/freifunk: show warning when libiwinfo is not installed. --- .../freifunk/luasrc/view/freifunk/public_status.htm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/freifunk/luasrc/view/freifunk/public_status.htm b/modules/freifunk/luasrc/view/freifunk/public_status.htm index 8f0352f82..8948d5e9d 100644 --- a/modules/freifunk/luasrc/view/freifunk/public_status.htm +++ b/modules/freifunk/luasrc/view/freifunk/public_status.htm @@ -1,7 +1,6 @@ <% local sys = require "luci.sys" local twa = require "luci.tools.webadmin" - -- System local system, model, memtotal, memcached, membuffers, memfree = sys.sysinfo() local uptime = twa.date_format(tonumber(sys.uptime())) @@ -24,6 +23,7 @@ local devices = ntm:get_wifidevs() local netlist = { } local netdevs = { } local dev +local has_iwinfo = pcall(require, "iwinfo") -- Routes local defroutev4 = sys.net.defaultroute() @@ -48,6 +48,14 @@ local defroutev6 = sys.net.defaultroute6 ()

<%:Wireless Overview%>

+ + <% if not has_iwinfo then %> +
+ <%:Package libiwinfo required!%>
+ <%_The libiwinfo package is not installed. You must install this component for working wireless configuration!%> +
+ <% end %> +
-- 2.25.1