From cf317543d9761e84b5dc348e1ac66376942c1d00 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Sat, 23 Nov 2019 21:09:08 -0800 Subject: [PATCH] x86: add luci eth info display --- package/lean/autocore/Makefile | 4 +- package/lean/autocore/files/index.htm | 38 +++- package/lean/autocore/files/sbin/cpuinfo | 28 +++ package/lean/autocore/files/sbin/ethinfo | 226 +++++++++++++++++++++++ 4 files changed, 291 insertions(+), 5 deletions(-) create mode 100755 package/lean/autocore/files/sbin/cpuinfo create mode 100755 package/lean/autocore/files/sbin/ethinfo diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index da5ab6577..28278222a 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:=19 +PKG_RELEASE:=21 include $(INCLUDE_DIR)/package.mk @@ -32,6 +32,8 @@ define Package/autocore/install $(INSTALL_BIN) ./files/autocore $(1)/etc/init.d/autocore $(INSTALL_DIR) $(1)/etc $(INSTALL_DATA) ./files/index.htm $(1)/etc/index.htm + $(INSTALL_DIR) $(1)/sbin + $(CP) ./files/sbin/* $(1)/sbin endef $(eval $(call BuildPackage,autocore)) diff --git a/package/lean/autocore/files/index.htm b/package/lean/autocore/files/index.htm index a1217b774..7d458eec3 100644 --- a/package/lean/autocore/files/index.htm +++ b/package/lean/autocore/files/index.htm @@ -46,7 +46,13 @@ "sysctl -n -e net.nf_conntrack_max net.ipv4.netfilter.ip_conntrack_max" ):match("%d+")) or 4096 + local cpu_info = luci.sys.exec("cpuinfo") + + local eth_info = luci.sys.exec("ethinfo") + local rv = { + cpuinfo = cpu_info, + ethinfo = eth_info, uptime = sysinfo.uptime or 0, localtime = os.date(), loadavg = sysinfo.load or { 0, 0, 0 }, @@ -109,7 +115,7 @@ <%+header%> - +