bug fix, first patch, usb networking wasn't working, not sure why this was never reported

This commit is contained in:
inxi-svn 2011-11-22 06:31:28 +00:00
parent 023ba2d188
commit 68b84a9e1e

19
inxi
View file

@ -3,7 +3,7 @@
#### Script Name: inxi #### Script Name: inxi
#### version: 1.7.26 #### version: 1.7.26
#### Date: November 21 2011 #### Date: November 21 2011
#### Patch Number: 00 #### Patch Number: 01
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
######################################################################## ########################################################################
@ -285,6 +285,7 @@ B_SHOW_X_DATA='false'
B_TESTING_1='false' B_TESTING_1='false'
B_TESTING_2='false' B_TESTING_2='false'
B_UPLOAD_DEBUG_DATA='false' B_UPLOAD_DEBUG_DATA='false'
B_USB_NETWORKING='false'
# set to true here for debug logging from script start # set to true here for debug logging from script start
B_USE_LOGGING='false' B_USE_LOGGING='false'
B_UUID_SET='false' B_UUID_SET='false'
@ -502,7 +503,7 @@ SENSORS_GPU_SEARCH='intel|radeon|nouveau'
### wifi/nic cards, they need further identifiers, with wildcards. ### wifi/nic cards, they need further identifiers, with wildcards.
### putting the most common and likely first, then the less common, then some specifics ### putting the most common and likely first, then the less common, then some specifics
USB_NETWORK_SEARCH="Wi-Fi.*Adapter|Wireless.*Adapter|WLAN.*Adapter|Network.*Adapter|802\.11|Atheros|Atmel|D-Link.*Adapter|D-Link.*Wireless|Linksys|Netgea|Ralink|Realtek.*Network|Realtek.*Wireless|Realtek.*WLAN|Belkin.*Wireless|Belkin.*WLAN|Belkin.*Network" USB_NETWORK_SEARCH="Wi-Fi.*Adapter|Wireless.*Adapter|WLAN.*Adapter|Network.*Adapter|802\.11|Atheros|Atmel|D-Link.*Adapter|D-Link.*Wireless|Linksys|Netgea|Ralink|Realtek.*Network|Realtek.*Wireless|Realtek.*WLAN|Belkin.*Wireless|Belkin.*WLAN|Belkin.*Network"
USB_NETWORK_SEARCH="$USB_NETWORK_SEARCH|Actiontec.*Wireless|Actiontec.*Network|AirLink.*Wireless|Asus.*Network|Asus.*Wireless|Buffalo.*Wireless|Davicom|DWA-.*RangeBooster|DWA-.*Wireless|ENUWI-.*Wireless|LG.*Wi-Fi|Rosewill.*Wireless|RNX-.*Wireless|Samsung.*LinkStick|Samsung.*Wireless|Sony.*Wireless|TEW-.*Wireless|TP-Link.*Wireless|WG[0-9][0-9][0-9].*Wireless|WNA[0-9][0-9][0-9]|WNDA[0-9][0-9][0-9]|Zonet.*ZEW.*Wireless" USB_NETWORK_SEARCH="$USB_NETWORK_SEARCH|Actiontec.*Wireless|Actiontec.*Network|AirLink.*Wireless|Asus.*Network|Asus.*Wireless|Buffalo.*Wireless|Davicom|DWA-.*RangeBooster|DWA-.*Wireless|ENUWI-.*Wireless|LG.*Wi-Fi|Rosewill.*Wireless|RNX-.*Wireless|Samsung.*LinkStick|Samsung.*Wireless|Sony.*Wireless|TEW-.*Wireless|TP-Link.*Wireless|WG[0-9][0-9][0-9].*Wireless|WNA[0-9][0-9][0-9]|WNDA[0-9][0-9][0-9]|Zonet.*ZEW.*Wireless|54 Mbps"
# then a few known hard to ID ones added # then a few known hard to ID ones added
# belkin=050d; d-link=07d1; netgear=0846; ralink=148f; realtek=0bda; # belkin=050d; d-link=07d1; netgear=0846; ralink=148f; realtek=0bda;
USB_NETWORK_SEARCH="$USB_NETWORK_SEARCH|050d:935b|0bda:8189|0bda:8197" USB_NETWORK_SEARCH="$USB_NETWORK_SEARCH|050d:935b|0bda:8189|0bda:8197"
@ -4359,7 +4360,7 @@ get_networking_data()
{ {
eval $LOGFS eval $LOGFS
local b_usb_networking='false' temp_array='' local B_USB_NETWORKING='false' temp_array=''
IFS=$'\n' IFS=$'\n'
A_NETWORK_DATA=( $( A_NETWORK_DATA=( $(
@ -4433,9 +4434,8 @@ get_networking_data()
}' }'
) ) ) )
IFS="$ORIGINAL_IFS" IFS="$ORIGINAL_IFS"
b_usb_networking=$( get_networking_usb_data ) get_networking_usb_data
if [[ $B_SHOW_ADVANCED_NETWORK == 'true' || $B_USB_NETWORKING == 'true' ]];then
if [[ $B_SHOW_ADVANCED_NETWORK == 'true' || $b_usb_networking == 'true' ]];then
get_network_advanced_data get_network_advanced_data
fi fi
temp_array=${A_NETWORK_DATA[@]} temp_array=${A_NETWORK_DATA[@]}
@ -4570,7 +4570,7 @@ get_network_advanced_data()
get_networking_usb_data() get_networking_usb_data()
{ {
eval $LOGFS eval $LOGFS
local lsusb_path='' lsusb_data='' a_usb='' array_count='' b_usb_networking='false' local lsusb_path='' lsusb_data='' a_usb='' array_count=''
# now we'll check for usb wifi, a work in progress # now we'll check for usb wifi, a work in progress
# USB_NETWORK_SEARCH # USB_NETWORK_SEARCH
@ -4619,12 +4619,11 @@ get_networking_usb_data()
done done
# need this to get the driver data for -N regular output, but no need # need this to get the driver data for -N regular output, but no need
# to run the advanced stuff unless required # to run the advanced stuff unless required
b_usb_networking='true' B_USB_NETWORKING='true'
fi fi
fi fi
fi fi
echo $b_usb_networking # echo $B_USB_NETWORKING
eval $LOGFE eval $LOGFE
} }