mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
bug fix, added system line
This commit is contained in:
parent
5f4b95dfa3
commit
6937b57028
59
inxi
59
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.5.97
|
#### version: 1.5.98
|
||||||
#### Date: June 7 2011
|
#### Date: June 7 2011
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -5940,7 +5940,7 @@ print_machine_data()
|
||||||
local bios_vendor='' bios_version='' bios_date=''
|
local bios_vendor='' bios_version='' bios_date=''
|
||||||
local system_vendor='' product_name='' product_version='' product_serial='' product_uuid=''
|
local system_vendor='' product_name='' product_version='' product_serial='' product_uuid=''
|
||||||
local chassis_vendor='' chassis_type='' chassis_version='' chassis_serial=''
|
local chassis_vendor='' chassis_type='' chassis_version='' chassis_serial=''
|
||||||
local b_skip_system='false'
|
local b_skip_system='false' b_skip_chassis='false'
|
||||||
# set A_MACHINE_DATA
|
# set A_MACHINE_DATA
|
||||||
get_machine_data
|
get_machine_data
|
||||||
|
|
||||||
|
@ -5968,25 +5968,24 @@ print_machine_data()
|
||||||
fi
|
fi
|
||||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
if [[ -n ${A_MACHINE_DATA[5]} && -n ${A_MACHINE_DATA[14]} && ${A_MACHINE_DATA[14]} == ${A_MACHINE_DATA[5]} ]];then
|
if [[ -n ${A_MACHINE_DATA[5]} && -n ${A_MACHINE_DATA[14]} && ${A_MACHINE_DATA[14]} == ${A_MACHINE_DATA[5]} ]];then
|
||||||
:
|
b_skip_chassis='true'
|
||||||
else
|
fi
|
||||||
if [[ -n ${A_MACHINE_DATA[12]} ]];then
|
if [[ -n ${A_MACHINE_DATA[12]} && $b_skip_chassis != 'true' ]];then
|
||||||
chassis_vendor="${C1}Chassis${C2} ${A_MACHINE_DATA[12]}"
|
chassis_vendor="${C1}Chassis${C2} ${A_MACHINE_DATA[12]}"
|
||||||
if [[ -n ${A_MACHINE_DATA[13]} ]];then
|
if [[ -n ${A_MACHINE_DATA[13]} ]];then
|
||||||
chassis_type=${A_MACHINE_DATA[13]}
|
chassis_type=${A_MACHINE_DATA[13]}
|
||||||
else
|
else
|
||||||
chassis_type='N/A'
|
chassis_type='N/A'
|
||||||
fi
|
|
||||||
if [[ -n ${A_MACHINE_DATA[14]} ]];then
|
|
||||||
chassis_version=${A_MACHINE_DATA[14]}
|
|
||||||
else
|
|
||||||
chassis_version='N/A'
|
|
||||||
fi
|
|
||||||
if [[ -n ${A_MACHINE_DATA[15]} && $B_OUTPUT_FILTER != 'true' ]];then
|
|
||||||
chassis_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[15]}"
|
|
||||||
fi
|
|
||||||
chassis_line="$chassis_vendor ${C1}type${C2} $chassis_type ${C1}version${C2} $chassis_version$chassis_serial"
|
|
||||||
fi
|
fi
|
||||||
|
if [[ -n ${A_MACHINE_DATA[14]} ]];then
|
||||||
|
chassis_version=${A_MACHINE_DATA[14]}
|
||||||
|
else
|
||||||
|
chassis_version='N/A'
|
||||||
|
fi
|
||||||
|
if [[ -n ${A_MACHINE_DATA[15]} && $B_OUTPUT_FILTER != 'true' ]];then
|
||||||
|
chassis_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[15]}"
|
||||||
|
fi
|
||||||
|
chassis_line="$chassis_vendor ${C1}type${C2} $chassis_type ${C1}version${C2} $chassis_version$chassis_serial"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n ${A_MACHINE_DATA[5]} ]];then
|
if [[ -n ${A_MACHINE_DATA[5]} ]];then
|
||||||
|
@ -6030,7 +6029,25 @@ print_machine_data()
|
||||||
system_line=$mobo_line
|
system_line=$mobo_line
|
||||||
mobo_line=''
|
mobo_line=''
|
||||||
else
|
else
|
||||||
system_line=
|
if [[ -n ${A_MACHINE_DATA[0]} ]];then
|
||||||
|
system_vendor=${A_MACHINE_DATA[0]}
|
||||||
|
else
|
||||||
|
system_vendor='N/A'
|
||||||
|
fi
|
||||||
|
if [[ -n ${A_MACHINE_DATA[1]} ]];then
|
||||||
|
product_name=${A_MACHINE_DATA[1]}
|
||||||
|
else
|
||||||
|
product_name='N/A'
|
||||||
|
fi
|
||||||
|
if [[ -n ${A_MACHINE_DATA[2]} ]];then
|
||||||
|
product_version=${A_MACHINE_DATA[2]}
|
||||||
|
else
|
||||||
|
product_version='N/A'
|
||||||
|
fi
|
||||||
|
if [[ -n ${A_MACHINE_DATA[3]} && $B_OUTPUT_FILTER != 'true' ]];then
|
||||||
|
product_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[3]} "
|
||||||
|
fi
|
||||||
|
system_line="${C1}System${C2} $system_vendor ${C1}product${C2} $product_name ${C1}version${C2} $product_version$product_serial"
|
||||||
fi
|
fi
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue