1
0
mirror of https://github.com/Spearfoot/FreeNAS-scripts synced 2025-12-31 07:13:13 +00:00

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
This commit is contained in:
max023
2017-07-16 12:38:35 +01:00
committed by Keith Nash
parent 22998dc858
commit 9ba66c9633

View File

@@ -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