Unverified Commit 6f8d365d authored by Simon Gredal's avatar Simon Gredal Committed by GitHub

Fix CPU Temp. not showing up on Raspberry Pi (#1566)

Added another possible name to the regex for finding cpu temperature. This was tested on a Raspberry Pi 4 running Arch Linux ARM.
parent b83a48a6
...@@ -2103,7 +2103,7 @@ get_cpu() { ...@@ -2103,7 +2103,7 @@ get_cpu() {
# Select the right temperature file. # Select the right temperature file.
for temp_dir in /sys/class/hwmon/*; do for temp_dir in /sys/class/hwmon/*; do
[[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power|k10temp) ]] && { [[ "$(< "${temp_dir}/name")" =~ (cpu_thermal|coretemp|fam15h_power|k10temp) ]] && {
temp_dirs=("$temp_dir"/temp*_input) temp_dirs=("$temp_dir"/temp*_input)
temp_dir=${temp_dirs[0]} temp_dir=${temp_dirs[0]}
break break
......
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