From 3c7d76677806df13b7d3d1979ca5defa662003fe Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 28 Nov 2016 08:06:04 +0100 Subject: luci-mod-admin-full: show realtime wlan graph only if iw command is installed Signed-off-by: Florian Eckert --- modules/luci-mod-admin-full/luasrc/controller/admin/status.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/luci-mod-admin-full/luasrc') diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua index 24db1e4ff..ad575e0d2 100644 --- a/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua +++ b/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua @@ -24,8 +24,10 @@ function index() entry({"admin", "status", "realtime", "bandwidth"}, template("admin_status/bandwidth"), _("Traffic"), 2).leaf = true entry({"admin", "status", "realtime", "bandwidth_status"}, call("action_bandwidth")).leaf = true - entry({"admin", "status", "realtime", "wireless"}, template("admin_status/wireless"), _("Wireless"), 3).leaf = true - entry({"admin", "status", "realtime", "wireless_status"}, call("action_wireless")).leaf = true + if nixio.fs.access("/etc/config/wireless") then + entry({"admin", "status", "realtime", "wireless"}, template("admin_status/wireless"), _("Wireless"), 3).leaf = true + entry({"admin", "status", "realtime", "wireless_status"}, call("action_wireless")).leaf = true + end entry({"admin", "status", "realtime", "connections"}, template("admin_status/connections"), _("Connections"), 4).leaf = true entry({"admin", "status", "realtime", "connections_status"}, call("action_connections")).leaf = true -- cgit v1.2.3