X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fcontroller%2Fadmin%2Fsystem.lua;h=6fcd66f44107e4ecdbcd167c630b4db6a6d31326;hp=5478afa3e6e2eab107459fb6f79e95dc9c185859;hb=c91ba4babc63fcc94771b608ae497a7a2db32b86;hpb=e1edb1025cd9e35b3617c20a1117a348971c0421 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 5478afa3e..6fcd66f44 100644 --- 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 = fs.glob("/sys/class/leds/*") + if number > 0 then entry({"admin", "system", "leds"}, cbi("admin_system/leds"), _("LED Configuration"), 60) end @@ -195,7 +196,7 @@ local function supports_sysupgrade() end local function supports_reset() - return (os.execute([[grep -sqE '"rootfs_data"|"ubi"' /proc/mtd]]) == 0) + return (os.execute([[grep -sq "^overlayfs:/overlay / overlay " /proc/mounts]]) == 0) end local function storage_size()