autocore: trim whitespace when wifi_temp is empty
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
f0ac305e35
commit
e6c7d13d23
@ -13,7 +13,7 @@ if grep -q "ipq40xx" "/etc/openwrt_release"; then
|
||||
if [ -e "$IEEE_PATH/phy0/hwmon0/temp1_input" ]; then
|
||||
mt76_temp=" $(awk -F ': ' '{print $2}' "$IEEE_PATH/phy0/hwmon0/temp1_input" 2>"/dev/null")°C"
|
||||
fi
|
||||
[ -z "$mt76_temp" ] || wifi_temp="$wifi_temp $mt76_temp"
|
||||
[ -z "$mt76_temp" ] || wifi_temp="${wifi_temp:+$wifi_temp }$mt76_temp"
|
||||
else
|
||||
cpu_temp="$(awk '{printf("%.1f°C", $0 / 1000)}' "$THERMAL_PATH/thermal_zone0/temp" 2>"/dev/null")"
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user