From d4519f26c59fd4b962d2224655cfd9e0ca19401a Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 25 Jun 2011 17:08:57 +0000 Subject: [PATCH] updated sensors to handle gpu data more cleanly. --- inxi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/inxi b/inxi index 0847a02..f0730cc 100755 --- a/inxi +++ b/inxi @@ -2,8 +2,8 @@ ######################################################################## #### Script Name: inxi #### version: 1.7.12 -#### Date: June 24 2011 -#### Patch Number: 03 +#### Date: June 25 2011 +#### Patch Number: 04 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -486,14 +486,16 @@ DISTROS_LSB_GOOD="mandrake-release mandriva-release mandrakelinux-release" BAN_LIST_NORMAL='computing|computer|corporation|communications|electronics|electrical|electric|gmbh|group|industrial|international|revision|software|technologies|technology|ltd\.|\|inc\.|\|intl\.|co\.|\|corp\.|\|\(tm\)|\(r\)|®|\(rev ..\)' BAN_LIST_CPU='@|cpu deca|dual core|dual-core|tri core|tri-core|quad core|quad-core|ennea|genuine|hepta|hexa|multi|octa|penta|processor|single|triple|[0-9\.]+ *[MmGg][Hh][Zz]' +SENSORS_GPU_SEARCH='intel|radeon|nouveau' + ### USB networking search string data, because some brands can have other products than ### wifi/nic cards, they need further identifiers, with wildcards. ### 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 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 " +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" # then a few known hard to ID ones added # 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" # WARNING: In the main part below (search for 'KONVI') # there's a check for Konversation-specific config files. @@ -3516,7 +3518,7 @@ get_gpu_temp_data() gpuTemp="" separator="" } - /^(radeon-|nouveau-)/ { + /^('"$SENSORS_GPU_SEARCH"')-pci/ { while ( getline && !/^$/ ) { if ( /^temp/ ) { sub(/^[[:alnum:]]*.*:/, "", $0 ) # clear out everything to the : @@ -4453,8 +4455,6 @@ get_networking_usb_data() if [[ -n $lsusb_path ]]; then # send error messages of lsusb to /dev/null as it will display a bunch if not a super user lsusb_data="$( $lsusb_path 2>/dev/null )" - # set spaces to | - USB_NETWORK_SEARCH=$( sed 's/[[:space:]]\+/|/g' <<< $USB_NETWORK_SEARCH ) # also, find the contents of usbid in lsusb and print everything after the 7th word on the # corresponding line. Finally, strip out commas as they will change the driver :) if [[ -n $lsusb_data ]];then @@ -5392,7 +5392,7 @@ get_sensors_data() tempWorkingUnit="" } # new data arriving: gpu temp in sensors, have to skip that - /^(radeon-|nouveau-)/ { + /^('"$SENSORS_GPU_SEARCH"')-pci/ { while ( getline && !/^$/ ) { # do nothing, just skip it }