mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
add back in test
This commit is contained in:
parent
d41b0e19de
commit
fc764ab7fc
5
inxi
5
inxi
|
@ -3361,6 +3361,7 @@ get_network_advanced_data()
|
||||||
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
|
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
|
||||||
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
|
working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}"
|
||||||
else
|
else
|
||||||
|
# slice off the usb- part
|
||||||
usb_data=$( cut -d '-' -f 2-4 <<< ${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_vendor=$( cut -d ':' -f 1 <<< $usb_data )
|
||||||
usb_product=$( cut -d ':' -f 2 <<< $usb_data )
|
usb_product=$( cut -d ':' -f 2 <<< $usb_data )
|
||||||
|
@ -3369,8 +3370,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' )
|
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' )
|
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
|
# 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
|
#if [[ -n $working_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
|
||||||
# to the /net directory part
|
# to the /net directory part
|
||||||
dir_path=$( ls ${working_path} 2>/dev/null | grep -sE '^[0-9]' )
|
dir_path=$( ls ${working_path} 2>/dev/null | grep -sE '^[0-9]' )
|
||||||
|
|
Loading…
Reference in a new issue