From 1aa5589eadf3ac17205d85cb37c5368a213b33d1 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Tue, 28 Jul 2009 18:23:29 +0000 Subject: [PATCH] small tweak for temp1/2 handling --- inxi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index a07293d..adbdb11 100755 --- a/inxi +++ b/inxi @@ -3116,11 +3116,16 @@ get_sensors_data() # first we need to handle the case where we have to determine which temp/fan to use for cpu and mobo: # note, for rare cases of weird cool cpus, user can override in their prefs and force the assignment if ( temp1 != "" && temp2 != "" ){ - if ( temp1 >= temp2 || userCpuNo == 1 ){ - tempFanType=1 + if ( userCpuNo ~ /(1|2)/ ) { + tempFanType=userCpuNo } else { - tempFanType=2 + if ( temp1 >= temp2 ) { + tempFanType=1 + } + else { + tempFanType=2 + } } }