mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
bug fix
This commit is contained in:
parent
3ea39aaa5d
commit
d41b0e19de
5
inxi
5
inxi
|
@ -3361,8 +3361,9 @@ get_network_advanced_data()
|
|||
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
|
||||
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
|
||||
else
|
||||
usb_vendor=$( cut -d ':' -f 1 <<< ${a_network_adv_working[4]} )
|
||||
usb_product=$( cut -d ':' -f 2 <<< ${a_network_adv_working[4]} )
|
||||
usb_data=$( cut -d '-' -f 2-4 <<< ${a_network_adv_working[4]} )
|
||||
usb_vendor=$( cut -d ':' -f 1 <<< $usb_data )
|
||||
usb_product=$( cut -d ':' -f 2 <<< $usb_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' )
|
||||
|
|
Loading…
Reference in a new issue