Commit c81e0140 authored by rage311's avatar rage311

Changed OpenBSD CPU temp retrieval to take into account machines that only…

Changed OpenBSD CPU temp retrieval to take into account machines that only expose cpu0.temp0 instead of lm0.temp0
parent 5889f1fe
...@@ -1086,8 +1086,9 @@ get_cpu() { ...@@ -1086,8 +1086,9 @@ get_cpu() {
deg="${deg/C}" deg="${deg/C}"
;; ;;
"OpenBSD"* | "Bitrig"*) "OpenBSD"* | "Bitrig"*)
deg="$(sysctl -n hw.sensors.lm0.temp0)" deg_var="$(sysctl hw.sensors | grep -m1 temp0 | cut -d'=' -f1)"
deg="${deg/ degC}" deg="$(sysctl -n $deg_var)"
deg="${deg/0 degC}"
;; ;;
esac esac
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment