diff --git a/package/emortal/autocore/Makefile b/package/emortal/autocore/Makefile index d6f0a0c15f..e5d3f5b3b0 100644 --- a/package/emortal/autocore/Makefile +++ b/package/emortal/autocore/Makefile @@ -21,8 +21,7 @@ define Package/autocore-arm MAINTAINER:=CN_SZTL DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_ipq40xx||TARGET_ipq806x||TARGET_mvebu||TARGET_sunxi) \ +TARGET_bcm27xx:bcm27xx-userland \ - +TARGET_bcm53xx:nvram \ - +(TARGET_ipq40xx||TARGET_ipq806x):lm-sensors + +TARGET_bcm53xx:nvram VARIANT:=arm endef diff --git a/package/emortal/autocore/files/arm/sbin/tempinfo b/package/emortal/autocore/files/arm/sbin/tempinfo index 812d1750f4..278f23f93b 100755 --- a/package/emortal/autocore/files/arm/sbin/tempinfo +++ b/package/emortal/autocore/files/arm/sbin/tempinfo @@ -5,11 +5,11 @@ if [ -e "${mt76_path}" ]; then mt76_temp=" $(cat "${mt76_path}" | awk -F ': ' '{print $2}')°C" fi -sys_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | grep -Ev 'high' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')" +wifi_temp="$(awk '{printf("%.1f°C ", $0 / 1000)}' /sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input)" if grep -q "ipq40xx" "/etc/openwrt_release"; then - echo -n "WiFi:${mt76_temp} ${sys_temp}" + echo -n "WiFi:${mt76_temp} ${wifi_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}" + cpu_temp="$(awk '{printf("%.1f°C", $0 / 1000)}' /sys/class/thermal/thermal_zone0/temp)" + echo -n "CPU: ${cpu_temp}, WiFi: ${wifi_temp}" fi