From 9ba66c9633f54f0408f7d001fe783943e944023b Mon Sep 17 00:00:00 2001 From: max023 Date: Sun, 16 Jul 2017 12:38:35 +0100 Subject: [PATCH] Fix CPU temp when returned value is not an integer in get_hdd_temp.sh (#2) * Fix CPU temp when returned value is not an integer in get_hdd_temp.sh * Small update to CPU temp fix --- get_hdd_temp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get_hdd_temp.sh b/get_hdd_temp.sh index ee5e855..6c6ba44 100644 --- a/get_hdd_temp.sh +++ b/get_hdd_temp.sh @@ -68,7 +68,7 @@ if [ "$use_ipmi" -eq 0 ]; then printf '=== CPU (%s) ===\n' "$cpucores" cpucores=$((cpucores - 1)) for core in $(seq 0 $cpucores); do - temp=$(sysctl -n dev.cpu."$core".temperature) + temp=$(sysctl -n dev.cpu."$core".temperature|sed 's/\..*$//g') if [ "$temp" -lt 0 ]; then temp="--n/a--" else