mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 08:35:25 +00:00
tweak
This commit is contained in:
parent
406bcaecf1
commit
a7c0dedd15
4
inxi
4
inxi
|
@ -3364,8 +3364,8 @@ get_network_advanced_data()
|
||||||
usb_vendor=$( cut -d ':' -f 1 <<< ${a_network_adv_working[4]} )
|
usb_vendor=$( cut -d ':' -f 1 <<< ${a_network_adv_working[4]} )
|
||||||
usb_product=$( cut -d ':' -f 2 <<< ${a_network_adv_working[4]} )
|
usb_product=$( cut -d ':' -f 2 <<< ${a_network_adv_working[4]} )
|
||||||
# this grep returns the path plus the contents of the file, with a colon separator, so slice that off
|
# this grep returns the path plus the contents of the file, with a colon separator, so slice that off
|
||||||
working_path=$( grep -s "$usb_vendor" /sys/devices/pci*/*/usb*/*/idVendor | sed "s/idVendor:$usb_vendor//" )
|
working_path=$( grep -s "$usb_vendor" /sys/devices/pci*/*/usb*/*/*/idVendor | sed "s/idVendor:$usb_vendor//" )
|
||||||
product_path=$( grep -s "$usb_product" /sys/devices/pci*/*/usb*/*/idProduct | sed "s/idProduct:$usb_product//" )
|
product_path=$( grep -s "$usb_product" /sys/devices/pci*/*/usb*/*/*/idProduct | sed "s/idProduct:$usb_product//" )
|
||||||
# make sure it's the right product/vendor match here, it will almost always be but let's be sure
|
# 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
|
||||||
# now ls that directory and get the numeric starting sub directory and that should be the full path
|
# now ls that directory and get the numeric starting sub directory and that should be the full path
|
||||||
|
|
Loading…
Reference in a new issue