modules/freifunk: show warning when libiwinfo is not installed.
This commit is contained in:
parent
86c1ce3f9a
commit
12f0c3cdd6
1 changed files with 9 additions and 1 deletions
|
@ -1,7 +1,6 @@
|
||||||
<%
|
<%
|
||||||
local sys = require "luci.sys"
|
local sys = require "luci.sys"
|
||||||
local twa = require "luci.tools.webadmin"
|
local twa = require "luci.tools.webadmin"
|
||||||
|
|
||||||
-- System
|
-- System
|
||||||
local system, model, memtotal, memcached, membuffers, memfree = sys.sysinfo()
|
local system, model, memtotal, memcached, membuffers, memfree = sys.sysinfo()
|
||||||
local uptime = twa.date_format(tonumber(sys.uptime()))
|
local uptime = twa.date_format(tonumber(sys.uptime()))
|
||||||
|
@ -24,6 +23,7 @@ local devices = ntm:get_wifidevs()
|
||||||
local netlist = { }
|
local netlist = { }
|
||||||
local netdevs = { }
|
local netdevs = { }
|
||||||
local dev
|
local dev
|
||||||
|
local has_iwinfo = pcall(require, "iwinfo")
|
||||||
|
|
||||||
-- Routes
|
-- Routes
|
||||||
local defroutev4 = sys.net.defaultroute()
|
local defroutev4 = sys.net.defaultroute()
|
||||||
|
@ -48,6 +48,14 @@ local defroutev6 = sys.net.defaultroute6 ()
|
||||||
|
|
||||||
<div class="cbi-map">
|
<div class="cbi-map">
|
||||||
<h2><%:Wireless Overview%></h2>
|
<h2><%:Wireless Overview%></h2>
|
||||||
|
|
||||||
|
<% if not has_iwinfo then %>
|
||||||
|
<div class="errorbox">
|
||||||
|
<strong><%:Package libiwinfo required!%></strong><br />
|
||||||
|
<%_The <em>libiwinfo</em> package is not installed. You must install this component for working wireless configuration!%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="cbi-section">
|
<div class="cbi-section">
|
||||||
<div class="cbi-section-node">
|
<div class="cbi-section-node">
|
||||||
<table class="cbi-section-table">
|
<table class="cbi-section-table">
|
||||||
|
|
Loading…
Reference in a new issue