Changed OpenBSD cpu temp logic to grep specifically for lm0 or cpu0

This commit is contained in:
rage311 2018-01-16 13:33:58 -07:00
parent 9984c51882
commit 840a653458
1 changed files with 1 additions and 1 deletions

View File

@ -1086,7 +1086,7 @@ get_cpu() {
deg="${deg/C}" deg="${deg/C}"
;; ;;
"OpenBSD"* | "Bitrig"*) "OpenBSD"* | "Bitrig"*)
deg_var="$(sysctl hw.sensors | grep -m1 temp0 | cut -d'=' -f1)" deg_var="$(sysctl hw.sensors | grep -m1 -E 'lm0.temp0|cpu0.temp0' | cut -d'=' -f1)"
deg="$(sysctl -n $deg_var)" deg="$(sysctl -n $deg_var)"
deg="${deg/0 degC}" deg="${deg/0 degC}"
;; ;;