diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile
index 1fe5c9f2e1..6e2c3b2d82 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:=35
+PKG_RELEASE:=36
include $(INCLUDE_DIR)/package.mk
@@ -46,7 +46,7 @@ define Package/autocore-arm/install
$(INSTALL_BIN) ./files/arm/090-cover-index_htm $(1)/etc/uci-defaults/090-cover-index_htm
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) ./files/arm/sbin/cpuinfo $(1)/sbin/cpuinfo
-ifeq ($(BOARD),ipq806x)
+ifneq (, $(findstring $(BOARD), ipq40xx ipq806x))
$(INSTALL_BIN) ./files/arm/sbin/tempinfo $(1)/sbin/tempinfo
endif
endef
diff --git a/package/lean/autocore/files/arm/index.htm b/package/lean/autocore/files/arm/index.htm
index 0a348fe462..212e186c33 100644
--- a/package/lean/autocore/files/arm/index.htm
+++ b/package/lean/autocore/files/arm/index.htm
@@ -698,6 +698,9 @@
| <%:Hostname%> | <%=luci.sys.hostname() or "?"%> |
| <%:Model%> | <%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or ""%> |
| <%:Architecture%> | - |
+ <% if has_temp then %>
+ | <%:Temperature%> | <%=luci.sys.exec("/sbin/tempinfo") or "?"%> |
+ <% end %>
| <%:Firmware Version%> |
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%>
@@ -706,9 +709,6 @@
|
| <%:Local Time%> | - |
| <%:Uptime%> | - |
| <%:Load Average%> | - |
- <% if has_temp then %>
- | <%:Temperature%> | <%=luci.sys.exec("/sbin/tempinfo") or "?"%> |
- <% end %>
| <%:CPU usage (%)%> | - |
diff --git a/package/lean/autocore/files/arm/sbin/cpuinfo b/package/lean/autocore/files/arm/sbin/cpuinfo
index 83df4c6238..e368ccd3a8 100755
--- a/package/lean/autocore/files/arm/sbin/cpuinfo
+++ b/package/lean/autocore/files/arm/sbin/cpuinfo
@@ -11,12 +11,7 @@ else
fi
if grep -q "ipq" "/etc/openwrt_release"; then
- if grep -q "ipq40xx" "/etc/openwrt_release"; then
- sys_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')"
- echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq}, ${sys_temp})"
- else
- echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq})"
- fi
+ echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq})"
else
sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq}, ${sys_temp})"
diff --git a/package/lean/autocore/files/arm/sbin/tempinfo b/package/lean/autocore/files/arm/sbin/tempinfo
index b42151d0e6..bd32b8fb16 100755
--- a/package/lean/autocore/files/arm/sbin/tempinfo
+++ b/package/lean/autocore/files/arm/sbin/tempinfo
@@ -1,6 +1,10 @@
#!/bin/sh
-cpu_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
sys_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | grep -Ev 'high' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')"
-echo -n "CPU: ${cpu_temp}, WiFi: ${sys_temp}"
+if grep -q "ipq40xx" "/etc/openwrt_release"; then
+ echo -n "WiFi: ${sys_temp}"
+else
+ cpu_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
+ echo -n "CPU: ${cpu_temp}, WiFi: ${sys_temp}"
+fi