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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user