more fine tunings of usb detections

This commit is contained in:
inxi-svn 2011-04-30 22:43:44 +00:00
parent 7f1e81b280
commit afdd2ccc09

7
inxi
View file

@ -465,7 +465,9 @@ BAN_LIST_CPU=''
### USB networking search string data, because some brands can have other products than
### wifi/nic cards, they need further identifiers, with wildcards.
USB_NETWORK_SEARCH="AirLink.*Wireless Atmel Belkin.*Wireless Belkin.*WLAN Belkin.*Network Buffalo.*Wireless D-Link.*Adapter D-Link.*Wireless Davicom DWA-.*RangeBooster DWA-.*Wireless ENUWI-.*Wireless LG.*Wi-Fi Linksys Netgear Ralink Realtek.*Network Realtek.*Wireless Realtek.*WLAN Rosewill.*Wireless RNX-.Wireless Samsung.*LinkStick Samsung.*Wireless Sony.*Wireless TEW-.*Wireless TP-Link.*Wireless WG[0-9]{3}.*Wireless WNA[0-9]{3} WNDA[0-9]{3} Zonet.*ZEW.*Wireless Wi-Fi.*Adapter Wireless.*Adapter WLAN.*Adapter"
### 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 Atmel D-Link.*Adapter D-Link.*Wireless Linksys Netgear 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]{3}.*Wireless WNA[0-9]{3} WNDA[0-9]{3} Zonet.*ZEW.*Wireless "
# then a few known hard to ID ones added
# belkin=050d; netgear=0846; ralink=148f; realtek=0bda;
USB_NETWORK_SEARCH="$USB_NETWORK_SEARCH 050d:935b 0bda:8189 0bda:8197"
@ -3340,7 +3342,8 @@ get_networking_data()
lsusb_data="$( $lsusb_path 2>/dev/null )"
for needle in $USB_NETWORK_SEARCH
do
if [[ -n $( grep -isE "$needle" <<< "$lsusb_data" | grep -Eisv '(bluetooth| hub|keyboard|mouse|printer| ps2|scan' ) ]];then
if [[ -n $( grep -isE "$needle" <<< "$lsusb_data" | \
grep -Eisv '(bluetooth| hub|keyboard|mouse|printer| ps2|reader|scan|storage' ) ]];then
card_data=$( grep -isE "$needle" <<< "$lsusb_data" )
fi
done