(change version)

By suggestion, now show no sensors output if error condition: missing sensors app OR no sensors output
This can be overridden for debugging by override with -! 1 flag, testing 1
This commit is contained in:
inxi-svn 2009-08-04 00:12:26 +00:00
parent 5c12898d86
commit 588dcac434

9
inxi
View file

@ -1,8 +1,8 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 1.1.8
#### Date: August 2 2009
#### version: 1.1.9
#### Date: August 3 2009
########################################################################
#### SPECIAL THANKS
########################################################################
@ -4253,7 +4253,7 @@ print_sensors_data()
# always has at least 3 items, cpu/mobo/psu temp in it. If it's a single item, then
# it's an error message, not the real data arrays.
if [[ ${#a_sensors_working[@]} -eq 1 ]];then
cpu_temp=${A_SENSORS_DATA[0]}
cpu_temp="${C1}Error:${C2} ${A_SENSORS_DATA[0]}"
b_is_error='true'
else
for (( i=0; i < ${#A_SENSORS_DATA[@]}; i++ ))
@ -4352,6 +4352,8 @@ print_sensors_data()
esac
done
fi
# turning off all output for case where no sensors detected or no sensors output
if [[ $b_is_error != 'true' || $B_TESTING_1 == 'true' ]];then
temp_data="$cpu_temp$mobo_temp$psu_temp$gpu_temp"
temp_data=$( create_print_line "Sensors:" "$temp_data" )
print_screen_output "$temp_data"
@ -4366,6 +4368,7 @@ print_sensors_data()
print_screen_output "$fan_data2"
fi
fi
fi
eval $LOGFE
}