mirror of
https://github.com/smxi/inxi.git
synced 2025-02-23 21:42:18 +00:00
bug fix should be ready to go now
This commit is contained in:
parent
fcf71c9f55
commit
a9fe030cea
31
inxi
31
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.1.1-b1
|
#### version: 1.1.2-b1
|
||||||
#### Date: 29 July 2009
|
#### Date: 29 July 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -3011,7 +3011,10 @@ get_partition_data_advanced()
|
||||||
get_sensors_data()
|
get_sensors_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
|
sample="
|
||||||
|
|
||||||
|
"
|
||||||
|
# echo "$sample" | gawk -F ': ' -v userCpuNo="$SENSORS_CPU_NO" '
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
if [[ $B_SENSORS == 'true' ]];then
|
if [[ $B_SENSORS == 'true' ]];then
|
||||||
# note: non-configured sensors gives error message, which we need to redirect to stdout
|
# note: non-configured sensors gives error message, which we need to redirect to stdout
|
||||||
|
@ -3202,17 +3205,6 @@ get_sensors_data()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# then set mobo fan if missing. Note, not trying to guess on either of these
|
|
||||||
# if ( ! 2 in aFanMain ) {
|
|
||||||
# aFanMain[2] = ""
|
|
||||||
# }
|
|
||||||
# # then set psu fan if missing
|
|
||||||
# if ( ! 3 in aFanMain ) {
|
|
||||||
# aFanMain[3] = ""
|
|
||||||
# }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# then we need to get the actual numeric max array count for both fan arrays
|
# then we need to get the actual numeric max array count for both fan arrays
|
||||||
for (i = 0; i <= 14; i++) {
|
for (i = 0; i <= 14; i++) {
|
||||||
if ( i in aFanMain && i > indexCountaFanMain ) {
|
if ( i in aFanMain && i > indexCountaFanMain ) {
|
||||||
|
@ -3263,6 +3255,10 @@ get_sensors_data()
|
||||||
else {
|
else {
|
||||||
# then build array arrays:
|
# then build array arrays:
|
||||||
print cpuTempReal "," moboTempReal "," psuTemp
|
print cpuTempReal "," moboTempReal "," psuTemp
|
||||||
|
# this is for output, a null print line does NOT create a new array index in bash
|
||||||
|
if ( fanMainString == "" && fanDefaultString == "" ) {
|
||||||
|
fanMainString=","
|
||||||
|
}
|
||||||
print fanMainString
|
print fanMainString
|
||||||
print fanDefaultString
|
print fanDefaultString
|
||||||
}
|
}
|
||||||
|
@ -4138,9 +4134,12 @@ print_sensors_data()
|
||||||
local temp_data='' fan_data='' fan_data2='' b_is_error='false' fan_count=0
|
local temp_data='' fan_data='' fan_data2='' b_is_error='false' fan_count=0
|
||||||
local a_sensors_working=''
|
local a_sensors_working=''
|
||||||
get_sensors_data
|
get_sensors_data
|
||||||
|
|
||||||
|
IFS=","
|
||||||
|
a_sensors_working=( ${A_SENSORS_DATA[0]} )
|
||||||
|
IFS="$ORIGINAL_IFS"
|
||||||
# initial error cases, for missing app or unconfigured sensors
|
# initial error cases, for missing app or unconfigured sensors
|
||||||
if [[ ${#A_SENSORS_DATA[@]} -eq 1 ]];then
|
if [[ ${#a_sensors_working[@]} -eq 1 ]];then
|
||||||
cpu_temp=${A_SENSORS_DATA[0]}
|
cpu_temp=${A_SENSORS_DATA[0]}
|
||||||
b_is_error='true'
|
b_is_error='true'
|
||||||
else
|
else
|
||||||
|
@ -4240,8 +4239,8 @@ print_sensors_data()
|
||||||
temp_data=$( create_print_line "Sensors:" "$temp_data" )
|
temp_data=$( create_print_line "Sensors:" "$temp_data" )
|
||||||
print_screen_output "$temp_data"
|
print_screen_output "$temp_data"
|
||||||
# don't print second or subsequent lines if error data
|
# don't print second or subsequent lines if error data
|
||||||
if [[ $b_is_error != 'true' ]];then
|
fan_data="$cpu_fan$mobo_fan$ps_fan$sys_fans"
|
||||||
fan_data="$cpu_fan$mobo_fan$ps_fan$sys_fans"
|
if [[ $b_is_error != 'true' && -n $fan_data ]];then
|
||||||
fan_data=$( create_print_line " " "$fan_data" )
|
fan_data=$( create_print_line " " "$fan_data" )
|
||||||
print_screen_output "$fan_data"
|
print_screen_output "$fan_data"
|
||||||
# and then second wrapped fan line if needed
|
# and then second wrapped fan line if needed
|
||||||
|
|
Loading…
Reference in a new issue