From 04b52469506f0bbc49fd1edebeb7567c3d12b873 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 19 Dec 2008 12:12:43 +0000 Subject: [PATCH] modules/admin-full: make menu entry for led config depend on sysfs availability --- modules/admin-full/luasrc/controller/admin/system.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.30.2