From d41b0e19dedc5eed2e52edee22e8faffec6c131a Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 30 Apr 2011 06:28:22 +0000 Subject: [PATCH] bug fix --- inxi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inxi b/inxi index 3eaab19..9378d22 100755 --- a/inxi +++ b/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' )