This commit is contained in:
inxi-svn 2012-10-19 05:43:37 +00:00
parent 839e844279
commit f962121e5e

10
inxi
View file

@ -4832,7 +4832,7 @@ get_network_advanced_data()
{ {
eval $LOGFS eval $LOGFS
local a_network_adv_working='' if_path='' working_path='' working_uevent_path='' dir_path='' 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='' local usb_data='' usb_vendor='' usb_product='' product_path='' driver_test=''
for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ )) for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ ))
@ -4847,6 +4847,7 @@ get_network_advanced_data()
mac_id='' mac_id=''
oper_state='' oper_state=''
usb_data='' usb_data=''
vendor_product=''
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then 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 # 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 # 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
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" IFS="$ORIGINAL_IFS"
done done
@ -4991,7 +4995,7 @@ get_networking_usb_data()
} }
if ( $2 != "" ){ if ( $2 != "" ){
sub(/:/, "", $4 ) sub(/:/, "", $4 )
print string ",,,,usb-" $2 "-" $4 "," $6 print string ",,,,usb-" $2 "-" $4 ",,,,,," $6
} }
}' <<< "$lsusb_data" }' <<< "$lsusb_data"
) ) ) )