mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 08:35:25 +00:00
some cleanup and bug fixes
This commit is contained in:
parent
7ba7db7b4d
commit
b589c9d5f7
18
inxi
18
inxi
|
@ -5974,19 +5974,15 @@ print_machine_data()
|
||||||
if [[ -n ${A_MACHINE_DATA[12]} && $b_skip_chassis != 'true' ]];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=" ${C1}type${C2} ${A_MACHINE_DATA[13]}"
|
||||||
else
|
|
||||||
chassis_type='N/A'
|
|
||||||
fi
|
fi
|
||||||
if [[ -n ${A_MACHINE_DATA[14]} ]];then
|
if [[ -n ${A_MACHINE_DATA[14]} ]];then
|
||||||
chassis_version=${A_MACHINE_DATA[14]}
|
chassis_version=" ${C1}version${C2} ${A_MACHINE_DATA[14]}"
|
||||||
else
|
|
||||||
chassis_version='N/A'
|
|
||||||
fi
|
fi
|
||||||
if [[ -n ${A_MACHINE_DATA[15]} && $B_OUTPUT_FILTER != 'true' ]];then
|
if [[ -n ${A_MACHINE_DATA[15]} && $B_OUTPUT_FILTER != 'true' ]];then
|
||||||
chassis_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[15]}"
|
chassis_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[15]}"
|
||||||
fi
|
fi
|
||||||
chassis_line="$chassis_vendor ${C1}type${C2} $chassis_type ${C1}version${C2} $chassis_version$chassis_serial"
|
chassis_line="$chassis_vendor$chassis_type$chassis_version$chassis_serial"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n ${A_MACHINE_DATA[5]} ]];then
|
if [[ -n ${A_MACHINE_DATA[5]} ]];then
|
||||||
|
@ -6022,7 +6018,7 @@ print_machine_data()
|
||||||
fi
|
fi
|
||||||
mobo_line="${C1}Mobo${C2} $mobo_vendor ${C1}model${C2} $mobo_model$mobo_version$mobo_serial"
|
mobo_line="${C1}Mobo${C2} $mobo_vendor ${C1}model${C2} $mobo_model$mobo_version$mobo_serial"
|
||||||
bios_line="${C1}Bios${C2} $bios_vendor ${C1}version${C2} $bios_version ${C1}date${C2} $bios_date"
|
bios_line="${C1}Bios${C2} $bios_vendor ${C1}version${C2} $bios_version ${C1}date${C2} $bios_date"
|
||||||
if [[ $( wc -c <<< "$mobo_line $bios_line" ) -lt $line_max ]];then
|
if [[ $( wc -c <<< "$mobo_line$bios_line" ) -lt $line_max ]];then
|
||||||
mobo_line="$mobo_line $bios_line"
|
mobo_line="$mobo_line $bios_line"
|
||||||
bios_line=''
|
bios_line=''
|
||||||
fi
|
fi
|
||||||
|
@ -6041,14 +6037,12 @@ print_machine_data()
|
||||||
product_name='N/A'
|
product_name='N/A'
|
||||||
fi
|
fi
|
||||||
if [[ -n ${A_MACHINE_DATA[2]} ]];then
|
if [[ -n ${A_MACHINE_DATA[2]} ]];then
|
||||||
product_version=${A_MACHINE_DATA[2]}
|
product_version=" ${C1}version${C2}${A_MACHINE_DATA[2]}"
|
||||||
else
|
|
||||||
product_version='N/A'
|
|
||||||
fi
|
fi
|
||||||
if [[ -n ${A_MACHINE_DATA[3]} && $B_OUTPUT_FILTER != 'true' ]];then
|
if [[ -n ${A_MACHINE_DATA[3]} && $B_OUTPUT_FILTER != 'true' ]];then
|
||||||
product_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[3]} "
|
product_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[3]} "
|
||||||
fi
|
fi
|
||||||
system_line="${C1}System${C2} $system_vendor ${C1}product${C2} $product_name ${C1}version${C2} $product_version$product_serial"
|
system_line="${C1}System${C2} $system_vendor ${C1}product${C2} $product_name$product_version$product_serial"
|
||||||
if [[ $( wc -c <<< "$system_line$chassis_line" ) -lt $line_max ]];then
|
if [[ $( wc -c <<< "$system_line$chassis_line" ) -lt $line_max ]];then
|
||||||
system_line="$system_line $chassis_line"
|
system_line="$system_line $chassis_line"
|
||||||
chassis_line=''
|
chassis_line=''
|
||||||
|
|
Loading…
Reference in a new issue