This commit is contained in:
inxi-svn 2011-04-30 06:23:53 +00:00
parent 4fcd0b12af
commit 3ea39aaa5d

3
inxi
View file

@ -3368,7 +3368,8 @@ get_network_advanced_data()
working_path=$( grep -s "$usb_vendor" /sys/devices/pci*/*/usb*/*/*/idVendor | sed -e "s/idVendor:$usb_vendor//" -e '/driver/d' )
product_path=$( grep -s "$usb_product" /sys/devices/pci*/*/usb*/*/*/idProduct | sed -e "s/idProduct:$usb_product//" -e '/driver/d' )
# make sure it's the right product/vendor match here, it will almost always be but let's be sure
if [[ -n $working_path && -n $product_path ]] && [[ $working_path == $product_path ]];then
# if [[ -n $working_path && -n $product_path ]] && [[ $working_path == $product_path ]];then
if [[ -n $working_path ]];then
# now ls that directory and get the numeric starting sub directory and that should be the full path
# to the /net directory part
dir_path=$( ls ${working_path} 2>/dev/null | grep -sE '^[0-9]' )