From 506a94a402d1c85cbf1c537b34fb71c06f33ae5b Mon Sep 17 00:00:00 2001 From: Tim Connors Date: Tue, 7 Dec 2021 22:17:16 +1100 Subject: [PATCH] =?UTF-8?q?sensors=20and=20hddtemp=20changed=20to=20proper?= =?UTF-8?q?=20unicode=20"=C2=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sensors and hddtemp changed to proper unicode "°" from ascii symbol, but that broke the regexp. Proxmox 7/debian 11 comes with such a fix. Thanks /u/FreelancerJ for reporting --- R710-IPMI-TEMP/fan-speed-control.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R710-IPMI-TEMP/fan-speed-control.pl b/R710-IPMI-TEMP/fan-speed-control.pl index 2541ec3..0b26566 100755 --- a/R710-IPMI-TEMP/fan-speed-control.pl +++ b/R710-IPMI-TEMP/fan-speed-control.pl @@ -211,10 +211,10 @@ while () { chomp @ambient_ipmitemps; chomp @hddtemps; - @cputemps = apply { s/.*: *([^ ]*).C.*/$1/ } @cputemps; - @coretemps = apply { s/.*: *([^ ]*).C.*/$1/ } @coretemps; + @cputemps = apply { s/.*: *([^ ]*)[.°]C.*/$1/ } @cputemps; + @coretemps = apply { s/.*: *([^ ]*)[.°]C.*/$1/ } @coretemps; @ambient_ipmitemps = apply { s/.*\| ([^ ]*) degrees C.*/$1/ } @ambient_ipmitemps; - @hddtemps = apply { s/.*: *([^ ]*).C.*/$1/ } @hddtemps; + @hddtemps = apply { s/.*: *([^ ]*)[.°]C.*/$1/ } @hddtemps; #FIXME: it is more important to keep hdds cool than CPUs. We should #put differnt offsets on them - possibly as easily as adding "10" to #hddtemp (but need to work out how to keep log output sane)