From f962121e5e126bc1e55b22e383722db249ac8995 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 19 Oct 2012 05:43:37 +0000 Subject: [PATCH] bug fix --- inxi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 1cdfac7..79b0ef5 100755 --- a/inxi +++ b/inxi @@ -4832,7 +4832,7 @@ get_network_advanced_data() { eval $LOGFS local a_network_adv_working='' if_path='' working_path='' working_uevent_path='' dir_path='' - local if_id='' speed='' duplex='' mac_id='' oper_state='' + local if_id='' speed='' duplex='' mac_id='' oper_state='' vendor_product='' local usb_data='' usb_vendor='' usb_product='' product_path='' driver_test='' for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ )) @@ -4847,6 +4847,7 @@ get_network_advanced_data() mac_id='' oper_state='' usb_data='' + vendor_product='' if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then # note although this may exist technically don't use it, it's a virtual path # and causes weird cat errors when there's a missing file as well as a virtual path @@ -4944,7 +4945,10 @@ get_network_advanced_data() fi fi - A_NETWORK_DATA[i]=${a_network_adv_working[0]}","${a_network_adv_working[1]}","${a_network_adv_working[2]}","${a_network_adv_working[3]}","${a_network_adv_working[4]}","$if_id","$oper_state","$speed","$duplex","$mac_id + if [[ -n ${a_network_adv_working[10]} ]];then + vendor_product=${a_network_adv_working[10]} + fi + A_NETWORK_DATA[i]=${a_network_adv_working[0]}","${a_network_adv_working[1]}","${a_network_adv_working[2]}","${a_network_adv_working[3]}","${a_network_adv_working[4]}","$if_id","$oper_state","$speed","$duplex","$mac_id","$vendor_product IFS="$ORIGINAL_IFS" done @@ -4991,7 +4995,7 @@ get_networking_usb_data() } if ( $2 != "" ){ sub(/:/, "", $4 ) - print string ",,,,usb-" $2 "-" $4 "," $6 + print string ",,,,usb-" $2 "-" $4 ",,,,,," $6 } }' <<< "$lsusb_data" ) )