From 95fc2438aca62ab92bd64c9d6d298793d31cba0f Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 16 Feb 2020 23:04:59 +0800 Subject: [PATCH] autocore: index.html fs.read method --- package/lean/autocore/Makefile | 2 +- package/lean/autocore/files/index.htm | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index 04dd9fb14..5a3ea1132 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autocore PKG_VERSION:=1 -PKG_RELEASE:=28 +PKG_RELEASE:=29 include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/autocore/files/index.htm b/package/lean/autocore/files/index.htm index 4fb64e9f8..22d1a5547 100644 --- a/package/lean/autocore/files/index.htm +++ b/package/lean/autocore/files/index.htm @@ -52,13 +52,7 @@ local user_info = tonumber(luci.sys.exec("cat /proc/net/arp | grep '0x2' | wc -l")) or 0 - local cpu_usage - - if fs.readfile("/tmp/cpuusage") then - cpu_usage = luci.sys.exec("cat /tmp/cpuusage") - else - cpu_usage = "6.6%" - end + local cpu_usage = fs.readfile("/tmp/cpuusage") or "6.6%" luci.sys.exec("/sbin/getcpu &")