summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFlorian Eckert <Eckert.Florian@googlemail.com>2016-11-28 08:06:04 +0100
committerFlorian Eckert <Eckert.Florian@googlemail.com>2016-12-12 15:08:50 +0100
commit3c7d76677806df13b7d3d1979ca5defa662003fe (patch)
tree2fca40674c93636df0826350efe5298719b63fe2
parentebb5a90f76a5c4f3876c94dc6215b4c54ceff216 (diff)
luci-mod-admin-full: show realtime wlan graph only if iw command is installed
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
-rw-r--r--modules/luci-mod-admin-full/luasrc/controller/admin/status.lua6
1 files changed, 4 insertions, 2 deletions
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 24db1e4ff5..ad575e0d26 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