more tweaks and fine tunings for variable detections

This commit is contained in:
inxi-svn 2009-07-27 20:41:18 +00:00
parent 8729fb72da
commit a4dde53b0f

23
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 1.0.90-b1
#### version: 1.0.91-b1
#### Date: 26 July 2009
########################################################################
#### SPECIAL THANKS
@ -3131,17 +3131,6 @@ get_sensors_data()
cpuFanReal=sysFan2
}
# then the mobo fan speed
if ( mobFan != "" ) {
moboFanReal=moboFan
}
else if ( tempFanType == 1 && sysFan1 != "" ) {
moboFanReal=sysFan2
}
else if ( tempFanType == 2 && sysFan2 != "" ) {
moboFanReal=sysFan1
}
# then double check the sys fans for duplication
if ( cpuFanReal == sysFan1 && cpuFanReal != 0 ) {
sysFan1 = ""
@ -3153,12 +3142,20 @@ get_sensors_data()
sysFan3 = ""
}
# and then build the temps:
if ( moboTempReal != "" ) {
moboTempReal = moboTempReal tempUnit
}
if ( cpuTempReal != "" ) {
cpuTempReal = cpuTempReal tempUnit
}
# if they are ALL null, print error message
if ( moboTempReal == "" && cpuTempReal == "" && cpuFanReal == "" && sysFan1Real == "" && sysFan2Real == "" && sysFan3Real == "" ) {
print "No active sensors found. Have you configured your sensors yet?"
}
else {
print moboTempReal tempUnit "," cpuTempReal tempUnit "," cpuFanReal "," sysFan1 "," sysFan2 "," sysFan3
print moboTempReal "," cpuTempReal "," cpuFanReal "," sysFan1 "," sysFan2 "," sysFan3
}
}
'