From: Florian Eckert Date: Mon, 28 Nov 2016 07:06:04 +0000 (+0100) Subject: luci-mod-admin-full: show realtime wlan graph only if iw command is installed X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3c7d76677806df13b7d3d1979ca5defa662003fe;p=oweals%2Fluci.git luci-mod-admin-full: show realtime wlan graph only if iw command is installed Signed-off-by: Florian Eckert --- 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