autocore-arm: remove the dependency on lm-sensors
This commit is contained in:
parent
fb08594769
commit
aeff8e17c8
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user