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
16
inxi
16
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
|
||||||
|
@ -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