mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
debugging, had to add alternate case for idVendor path
This commit is contained in:
parent
455dceb405
commit
021299a5d8
12
inxi
12
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.4.92
|
||||
#### version: 1.4.93
|
||||
#### Date: April 30 2011
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -3414,7 +3414,15 @@ get_network_advanced_data()
|
|||
# this grep returns the path plus the contents of the file, with a colon separator, so slice that off
|
||||
# /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/idVendor
|
||||
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' )
|
||||
# try an alternate path if first one doesn't work
|
||||
# /sys/devices/pci0000:00/0000:00:0b.1/usb1/1-1/idVendor
|
||||
if [[ -z $working_path ]];then
|
||||
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' )
|
||||
else
|
||||
product_path=$( grep -s "$usb_product" /sys/devices/pci*/*/usb*/*/*/idProduct | sed -e "s/idProduct:$usb_product//" -e '/driver/d' )
|
||||
fi
|
||||
|
||||
# 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 ]];then
|
||||
|
|
Loading…
Reference in a new issue