autocore: strip white space

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2021-06-29 22:07:07 +08:00
parent 8fbe36f23a
commit 4991d0e6b0
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -20,7 +20,7 @@ fi
if grep -q "bcm27xx" "/etc/openwrt_release"; then
cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C"
elif grep -q "ipq40xx" "/etc/openwrt_release"; then
cpu_temp="$(awk '{printf("%.1f°C ", $0 / 1000)}' /sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input)"
cpu_temp="$(awk '{printf("%.1f°C ", $0 / 1000)}' /sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input | awk '$1=$1')"
else
[ -e "/sys/class/thermal/thermal_zone0/temp" ] && \
cpu_temp="$(awk '{printf("%.1f°C", $0 / 1000)}' /sys/class/thermal/thermal_zone0/temp)"