diff --git a/inxi b/inxi index cb8984a..6d0e4bf 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.0.107-b1 +#### version: 1.0.108-b1 #### Date: 28 July 2009 ######################################################################## #### SPECIAL THANKS @@ -3011,7 +3011,7 @@ get_partition_data_advanced() get_sensors_data() { eval $LOGFS - + IFS="," if [[ $B_SENSORS == 'true' ]];then # note: non-configured sensors gives error message, which we need to redirect to stdout @@ -3063,6 +3063,7 @@ get_sensors_data() } /^temp2:/ { # add to array if array index does not exist OR if number is > 0 + tempWorking=gensub( /\+(.+)/, "\\1", 1, $2 ) if ( temp2 == "" || tempWorking > 0 ) { temp2=tempWorking @@ -3072,14 +3073,23 @@ get_sensors_data() } } # final fallback if all else fails - /^core0:/ { - tempWorking=gensub( /\+(.+)/, "\\1", 1, $2 ) + /^core0:|core 0:|core0 Temp/ { + if ( $2 ~ /(.+):/ ){ + tempWorking=$3 + } + else { + tempWorking=$2 + } + tempWorking=gensub( /\+(.+)/, "\\1", 1, tempWorking ) if ( core0Temp == "" || tempWorking > 0 ) { - core0Temp=$2 + core0Temp=tempWorking } if ( $3 ~ /C|F/ && tempUnit == "" ){ tempUnit="°" $3 } + else if ( $4 ~ /C|F/ && tempUnit == "" ){ + tempUnit="°" $4 + } } # note: can be cpu fan:, cpu fan speed:, etc