From fe79a7d84bce908873534af27c07712cf2974d8e Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Tue, 7 Jun 2022 19:42:22 +0300 Subject: don't proceed if failed to read envtemp --- armbian-envtemp-cpufreq.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'armbian-envtemp-cpufreq.sh') diff --git a/armbian-envtemp-cpufreq.sh b/armbian-envtemp-cpufreq.sh index 4b88edd..e46d3c2 100644 --- a/armbian-envtemp-cpufreq.sh +++ b/armbian-envtemp-cpufreq.sh @@ -95,6 +95,7 @@ echo -n "read" >&3 read -t 5 response <&3 envtemp=$(echo "$response" | jq ".temp" | awk "{print int(\$1+0.5)}") +[ -z "$envtemp" ] && die "failed to read environment temperature" # setting corresponding cpu freq while read temp; do -- cgit v1.2.3