diff --git a/inxi b/inxi index 930a6c3..b99af45 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.5.97 +#### version: 1.5.98 #### Date: June 7 2011 ######################################################################## #### SPECIAL THANKS @@ -5940,7 +5940,7 @@ print_machine_data() local bios_vendor='' bios_version='' bios_date='' local system_vendor='' product_name='' product_version='' product_serial='' product_uuid='' 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 get_machine_data @@ -5968,25 +5968,24 @@ print_machine_data() fi 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 - : - else - if [[ -n ${A_MACHINE_DATA[12]} ]];then - chassis_vendor="${C1}Chassis${C2} ${A_MACHINE_DATA[12]}" - if [[ -n ${A_MACHINE_DATA[13]} ]];then - chassis_type=${A_MACHINE_DATA[13]} - else - 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" + b_skip_chassis='true' + fi + if [[ -n ${A_MACHINE_DATA[12]} && $b_skip_chassis != 'true' ]];then + chassis_vendor="${C1}Chassis${C2} ${A_MACHINE_DATA[12]}" + if [[ -n ${A_MACHINE_DATA[13]} ]];then + chassis_type=${A_MACHINE_DATA[13]} + else + 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[5]} ]];then @@ -6030,7 +6029,25 @@ print_machine_data() system_line=$mobo_line mobo_line='' 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 IFS="$ORIGINAL_IFS" else