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=cf8cfb5d2dd5749d25a91ceb20b5ea00107925fb;hb=c91ba4babc63fcc94771b608ae497a7a2db32b86;hpb=cad07f62d5babff35f8b39c341e5657d362d052a 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 cf8cfb5d2..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 @@ -52,6 +53,7 @@ function action_clock_status() luci.sys.call("date -s '%04d-%02d-%02d %02d:%02d:%02d'" %{ date.year, date.month, date.day, date.hour, date.min, date.sec }) + luci.sys.call("/etc/init.d/sysfixtime restart") end end @@ -194,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()