small tweak for temp1/2 handling

This commit is contained in:
inxi-svn 2009-07-28 18:23:29 +00:00
parent fcf62e4d52
commit 1aa5589ead

11
inxi
View file

@ -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: # 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 # note, for rare cases of weird cool cpus, user can override in their prefs and force the assignment
if ( temp1 != "" && temp2 != "" ){ if ( temp1 != "" && temp2 != "" ){
if ( temp1 >= temp2 || userCpuNo == 1 ){ if ( userCpuNo ~ /(1|2)/ ) {
tempFanType=1 tempFanType=userCpuNo
} }
else { else {
tempFanType=2 if ( temp1 >= temp2 ) {
tempFanType=1
}
else {
tempFanType=2
}
} }
} }