git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
da4fab0
)
luci-mod-admin-full: no menu entry for leds if "/sys/class/leds" is empty
author
Florian Eckert
<redacted>
Sun, 4 Jun 2017 16:49:27 +0000
(18:49 +0200)
committer
Yousong Zhou
<redacted>
Mon, 7 May 2018 13:14:48 +0000
(21:14 +0800)
Signed-off-by: Florian Eckert <redacted>
Signed-off-by: Yousong Zhou <redacted>
modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
patch
|
blob
|
history
diff --git
a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
index 51f9d9d7b6386f2cc777f5a04c7f5cbb5b8d6566..85bf3b6867c83e6a515c3f924b7715daeb2241d7 100644
(file)
--- a/
modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
+++ b/
modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
@@
-27,7
+27,8
@@
function index()
entry({"admin", "system", "fstab", "swap"}, cbi("admin_system/fstab/swap"), nil).leaf = true
end
- if fs.access("/sys/class/leds") then
+ local nodes, number = nixio.fs.glob("/sys/class/leds/*")
+ if number > 0 then
entry({"admin", "system", "leds"}, cbi("admin_system/leds"), _("<abbr title=\"Light Emitting Diode\">LED</abbr> Configuration"), 60)
end
git clone https://git.99rst.org/PROJECT