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.
This commit is contained in:
Simon Gredal 2020-09-27 06:39:11 +02:00 committed by GitHub
parent b83a48a60f
commit 6f8d365deb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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