summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-12-19 12:12:43 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-12-19 12:12:43 +0000
commit04b52469506f0bbc49fd1edebeb7567c3d12b873 (patch)
tree30939bc0b1d6df63de36576914af04fea18d5f75 /modules/admin-full/luasrc
parent0c3f77a3971699382d86fd1016aae7dcd0205f91 (diff)
modules/admin-full: make menu entry for led config depend on sysfs availability
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r--modules/admin-full/luasrc/controller/admin/system.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua
index b6de148843..9071bfdfe4 100644
--- a/modules/admin-full/luasrc/controller/admin/system.lua
+++ b/modules/admin-full/luasrc/controller/admin/system.lua
@@ -25,7 +25,11 @@ function index()
entry({"admin", "system", "sshkeys"}, form("admin_system/sshkeys"), i18n("a_s_sshkeys"), 30)
entry({"admin", "system", "processes"}, form("admin_system/processes"), i18n("process_head"), 45)
entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), i18n("a_s_fstab"), 50)
- entry({"admin", "system", "leds"}, cbi("admin_system/leds"), i18n("leds", "LEDs"), 60)
+
+ if luci.fs.isdirectory("/sys/class/leds") then
+ entry({"admin", "system", "leds"}, cbi("admin_system/leds"), i18n("leds", "LEDs"), 60)
+ end
+
entry({"admin", "system", "backup"}, call("action_backup"), i18n("a_s_backup"), 70)
entry({"admin", "system", "upgrade"}, call("action_upgrade"), i18n("a_s_flash"), 80)
entry({"admin", "system", "reboot"}, call("action_reboot"), i18n("reboot"), 90)