modules/admin-full: display an error if libiwinfo is not installed
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 27 Nov 2010 18:24:38 +0000 (18:24 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 27 Nov 2010 18:24:38 +0000 (18:24 +0000)
modules/admin-full/luasrc/view/admin_network/wifi_overview.htm

index d476baa5f91aa577eb536a8cec49cd778904d483..6a1020670bf3c7784ac408d7efa243795595d534 100644 (file)
@@ -87,10 +87,19 @@ $Id$
                        netdevs[net:ifname()] = dev:name()
                end
        end
+
+       local has_iwinfo = pcall(require, "iwinfo")
 -%>
 
 <%+header%>
 
+<% 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 %>
+
 <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
 <script type="text/javascript">//<![CDATA[
        var iwxhr = new XHR();