some more variable cleanup and syncing

This commit is contained in:
inxi-svn 2010-01-09 04:54:17 +00:00
parent d48147d79d
commit d61404ff3f

34
inxi
View file

@ -229,11 +229,11 @@ B_X_RUNNING='false'
B_DBUS_CLIENT='false' B_DBUS_CLIENT='false'
### Directory/file exist flags; test as [[ $(boolean) ]] not [[ $boolean ]] ### Directory/file exist flags; test as [[ $(boolean) ]] not [[ $boolean ]]
B_PROC='false' B_PROC_DIR='false'
B_CPUINFO='false' B_CPUINFO_FILE='false'
B_MEMINFO='false' B_MEMINFO_FILE='false'
B_ASOUND_CARDS='false' B_ASOUND_DEVICE_FILE='false'
B_ASOUND_VERSION='false' B_ASOUND_VERSION_FILE='false'
B_BASH_ARRAY='false' B_BASH_ARRAY='false'
B_IFCONFIG='false' B_IFCONFIG='false'
B_LSB_FILE='false' B_LSB_FILE='false'
@ -521,25 +521,25 @@ initialize_script_data()
# now set the script BOOLEANS for files required to run features # now set the script BOOLEANS for files required to run features
if [[ -d "/proc/" ]];then if [[ -d "/proc/" ]];then
B_PROC='true' B_PROC_DIR='true'
else else
error_handler 6 error_handler 6
fi fi
if [[ -e $FILE_CPUINFO ]]; then if [[ -e $FILE_CPUINFO ]]; then
B_CPUINFO='true' B_CPUINFO_FILE='true'
fi fi
if [[ -e $FILE_MEMINFO ]];then if [[ -e $FILE_MEMINFO ]];then
B_MEMINFO='true' B_MEMINFO_FILE='true'
fi fi
if [[ -e $FILE_ASOUND_DEVICE ]];then if [[ -e $FILE_ASOUND_DEVICE ]];then
B_ASOUND_CARDS='true' B_ASOUND_DEVICE_FILE='true'
fi fi
if [[ -e $FILE_ASOUND_VERSION ]];then if [[ -e $FILE_ASOUND_VERSION ]];then
B_ASOUND_VERSION='true' B_ASOUND_VERSION_FILE='true'
fi fi
if [[ -f $FILE_LSB_RELEASE ]];then if [[ -f $FILE_LSB_RELEASE ]];then
@ -1655,7 +1655,7 @@ get_audio_data()
IFS=$'\n' IFS=$'\n'
# this first step handles the drivers for cases where the second step fails to find one # this first step handles the drivers for cases where the second step fails to find one
device_count=$( echo "$Lspci_Data" | egrep -ic '(multimedia audio controller|audio device)' ) device_count=$( echo "$Lspci_Data" | egrep -ic '(multimedia audio controller|audio device)' )
if [[ $device_count -eq 1 ]] && [[ $B_ASOUND_CARDS == 'true' ]];then if [[ $device_count -eq 1 ]] && [[ $B_ASOUND_DEVICE_FILE == 'true' ]];then
alsa_driver=$( gawk -F ']: ' ' alsa_driver=$( gawk -F ']: ' '
BEGIN { BEGIN {
IGNORECASE=1 IGNORECASE=1
@ -1748,7 +1748,7 @@ get_audio_data()
}') ) }') )
# in case of failure of first check do this instead # in case of failure of first check do this instead
if [[ ${#A_AUDIO_DATA[@]} -eq 0 ]] && [[ $B_ASOUND_CARDS == 'true' ]];then if [[ ${#A_AUDIO_DATA[@]} -eq 0 ]] && [[ $B_ASOUND_DEVICE_FILE == 'true' ]];then
A_AUDIO_DATA=( $( gawk -F ']: ' ' A_AUDIO_DATA=( $( gawk -F ']: ' '
BEGIN { BEGIN {
IGNORECASE=1 IGNORECASE=1
@ -1805,7 +1805,7 @@ get_audio_alsa_data()
local alsa_data='' local alsa_data=''
# now we'll get the alsa data if the file exists # now we'll get the alsa data if the file exists
if [[ $B_ASOUND_VERSION == 'true' ]];then if [[ $B_ASOUND_VERSION_FILE == 'true' ]];then
alsa_data=$( gawk ' alsa_data=$( gawk '
BEGIN { BEGIN {
IGNORECASE=1 IGNORECASE=1
@ -1833,7 +1833,7 @@ get_audio_alsa_data()
get_cpu_core_count() get_cpu_core_count()
{ {
eval $LOGFS eval $LOGFS
if [[ $B_CPUINFO == 'true' ]]; then if [[ $B_CPUINFO_FILE == 'true' ]]; then
# load the A_CPU_TYPE_PCNT_CCNT core data array # load the A_CPU_TYPE_PCNT_CCNT core data array
get_cpu_ht_multicore_smp_data get_cpu_ht_multicore_smp_data
## Because of the upcoming release of cpus with core counts over 6, a count of cores is given after Deca (10) ## Because of the upcoming release of cpus with core counts over 6, a count of cores is given after Deca (10)
@ -1870,7 +1870,7 @@ get_cpu_data()
eval $LOGFS eval $LOGFS
local i='' j='' cpu_array_nu='' a_cpu_working='' multi_cpu='' bits='' local i='' j='' cpu_array_nu='' a_cpu_working='' multi_cpu='' bits=''
if [[ $B_CPUINFO == 'true' ]];then if [[ $B_CPUINFO_FILE == 'true' ]];then
IFS=$'\n' IFS=$'\n'
A_CPU_DATA=( $( gawk -F': ' ' A_CPU_DATA=( $( gawk -F': ' '
BEGIN { BEGIN {
@ -1963,7 +1963,7 @@ get_cpu_ht_multicore_smp_data()
# if > 1 processor && processor id != core id then Multi-Core Processors (MCP) # if > 1 processor && processor id != core id then Multi-Core Processors (MCP)
# if = 1 processor then single core/processor Uni-Processor (UP) # if = 1 processor then single core/processor Uni-Processor (UP)
if [[ $B_CPUINFO == 'true' ]]; then if [[ $B_CPUINFO_FILE == 'true' ]]; then
A_CPU_TYPE_PCNT_CCNT=( $( A_CPU_TYPE_PCNT_CCNT=( $(
gawk ' gawk '
BEGIN { BEGIN {
@ -2719,7 +2719,7 @@ get_memory_data()
{ {
eval $LOGFS eval $LOGFS
local memory='' local memory=''
if [[ $B_MEMINFO == 'true' ]];then if [[ $B_MEMINFO_FILE == 'true' ]];then
memory=$( gawk ' memory=$( gawk '
/^MemTotal:/ { /^MemTotal:/ {
tot = $2 tot = $2