From d3505da78d8945f0c6af2f3c93bc348b4dee8050 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 9 Jun 2011 01:51:46 +0000 Subject: [PATCH] added more wifi detection filters --- inxi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/inxi b/inxi index f52a994..c49a606 100755 --- a/inxi +++ b/inxi @@ -224,13 +224,13 @@ B_EXTRA_EXTRA_DATA='false' # override certain errors due to currupted data B_HANDLE_CORRUPT_DATA='false' B_LABEL_SET='false' -B_LAPTOP='false' B_LOG_COLORS='false' B_LOG_FULL_DATA='false' B_OUTPUT_FILTER='false' B_OVERRIDE_FILTER='false' # kde qdbus B_QDBUS='false' +B_PORTABLE='false' B_ROOT='false' B_RUN_COLOR_SELECTOR='false' # Running in a shell? Defaults to false, and is determined later. @@ -673,7 +673,7 @@ initialize_script_data() fi # found a case of battery existing but having nothing in it on desktop mobo if [[ -n $( ls /proc/acpi/battery 2>/dev/null ) ]];then - B_LAPTOP='true' + B_PORTABLE='true' fi if [[ -e $FILE_CPUINFO ]]; then B_CPUINFO_FILE='true' @@ -3786,7 +3786,8 @@ get_machine_data() { gsub(/'"$BAN_LIST_NORMAL"'/, "", $0) gsub(/,/, " ", $0) - sub(/To Be Filled By O.E.M.|Not Available|Not Applicable|System manufacturer|System Product Name|System Version|unknown|unknow|N\/A|OEM|none/, "", $0) # yes, there is a typo in a user data set, unknow + # yes, there is a typo in a user data set, unknow + sub(/To Be Filled By O.E.M.|Not Available|Not Applicable|System manufacturer|System Product Name|System Version|unknown|unknow|N\/A|OEM|none/, "", $0) gsub(/bios|acpi/, "", $0) sub(/http:\/\/www.abit.com.tw\//, "Abit", $0) gsub(/^ +| +$/, "", $0) @@ -5974,7 +5975,7 @@ print_machine_data() if [[ -z ${A_MACHINE_DATA[0]} ]];then b_skip_system='true' else - if [[ $B_LAPTOP != 'true' ]];then + if [[ $B_PORTABLE != 'true' ]];then # ibm / ibm can be true; dell / quantum is false, so in other words, only do this # in case where the vendor is the same and the version is the same and not null, # otherwise the version information is going to be different in all cases I think @@ -6053,7 +6054,7 @@ print_machine_data() else # this has already been tested for above so we know it's not null system_vendor=${A_MACHINE_DATA[0]} - if [[ $B_LAPTOP == 'true' ]];then + if [[ $B_PORTABLE == 'true' ]];then system_vendor="$system_vendor (portable)" fi if [[ -n ${A_MACHINE_DATA[1]} ]];then @@ -6234,7 +6235,7 @@ print_network_advanced_data() if [[ $B_SHOW_ADVANCED_NETWORK == 'true' ]];then # first check if it's a known wifi id'ed card, if so, no print of duplex/speed - if [[ -n $( grep -Esi '(wireless|wifi|wi-fi|wlan|802\.11)' <<< ${a_network_working[0]} ) ]];then + if [[ -n $( grep -Esi '(wireless|wifi|wi-fi|wlan|802\.11|centrino)' <<< ${a_network_working[0]} ) ]];then b_is_wifi='true' fi if [[ -n ${a_network_working[5]} ]];then