From 96ad63541be9d428b56cda9a7be9c6e8eb6deae8 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 6 Jun 2011 05:01:14 +0000 Subject: [PATCH] bug fixes, and upped version number. Yes, fixing one bug caused another, hopefully both are now fixed --- inxi | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/inxi b/inxi index b0a4819..472cb09 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.5.12 +#### version: 1.5.13 #### Date: June 5 2011 ######################################################################## #### SPECIAL THANKS @@ -3960,16 +3960,20 @@ get_network_advanced_data() fi fi log_function_data "PRE: working_path: $working_path\nworking_uevent_path: $working_uevent_path" - if [[ -n $usb_data && -e $working_uevent_path/net ]];then - if_path=$( ls $working_uevent_path/net 2>/dev/null ) - if_id=$if_path - working_path=$working_uevent_path/net/$if_path - # this case, from debian squeeze 2.6.32-5-686: + + # this applies in two different cases, one, default, standard, two, for usb, this is actually + # the short path, minus the last longer numeric directory name, ie: + # from debian squeeze 2.6.32-5-686: # /sys/devices/pci0000:00/0000:00:0b.1/usb1/1-1/net/wlan0/address - elif [[ -e $working_path/net ]];then + if [[ -e $working_path/net ]];then if_path=$( ls $working_path/net 2>/dev/null ) if_id=$if_path working_path=$working_path/net/$if_path + # this is the normal usb detection if the first one didn't work + elif [[ -n $usb_data && -e $working_uevent_path/net ]];then + if_path=$( ls $working_uevent_path/net 2>/dev/null ) + if_id=$if_path + working_path=$working_uevent_path/net/$if_path # 2.6.32 debian lenny kernel shows not: /net/eth0 but /net:eth0 else if_path=$( ls $working_path 2>/dev/null | grep 'net:' )