New version. Some BSD fixes, and a more important fix, added 'display controller'

to graphics card detection, that's a new one on me. Dual card systems might use this.

00:02.0 Display controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)

01:00.0 VGA compatible controller: NVIDIA Corporation NV44A [GeForce 6200] (rev a1)

Some more switches to bash native methods as well.
This commit is contained in:
inxi-svn 2014-03-18 02:26:26 +00:00
parent 45ab090d91
commit 1d34526818
2 changed files with 30 additions and 14 deletions

25
inxi
View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### Version: 2.1.3 #### Version: 2.1.4
#### Date: 2014-03-16 #### Date: 2014-03-17
#### Patch Number: 00 #### Patch Number: 00
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -959,7 +959,7 @@ initialize_paths()
IFS="$ORIGINAL_IFS" IFS="$ORIGINAL_IFS"
PATH="$PATH$added_path" PATH="$PATH$added_path"
##echo "PATH='$PATH'" # echo "PATH='$PATH'"
##/bin/sh -c 'echo "PATH in subshell=\"$PATH\""' ##/bin/sh -c 'echo "PATH in subshell=\"$PATH\""'
} }
@ -2029,18 +2029,14 @@ print_screen_output()
print_data="P: $print_data" print_data="P: $print_data"
fi fi
fi fi
if [[ $KONVI -eq 1 && $B_DCOP == 'true' ]]; then ## dcop Konversation (<= 1.1 (qt3)) if [[ $KONVI -eq 1 && $B_DCOP == 'true' ]]; then ## dcop Konversation (<= 1.1 (qt3))
# konvi doesn't seem to like \n characters, it just prints them literally # konvi doesn't seem to like \n characters, it just prints them literally
$print_data="$( tr '\n' ' ' <<< "$print_data" )" $print_data="$( tr '\n' ' ' <<< "$print_data" )"
dcop "$DCPORT" "$DCOPOBJ" say "$DCSERVER" "$DCTARGET" "$print_data" dcop "$DCPORT" "$DCOPOBJ" say "$DCSERVER" "$DCTARGET" "$print_data"
elif [[ $KONVI -eq 3 && $B_QDBUS == 'true' ]]; then ## dbus Konversation (> 1.2 (qt4)) elif [[ $KONVI -eq 3 && $B_QDBUS == 'true' ]]; then ## dbus Konversation (> 1.2 (qt4))
qdbus org.kde.konversation /irc say "$DCSERVER" "$DCTARGET" "$print_data" qdbus org.kde.konversation /irc say "$DCSERVER" "$DCTARGET" "$print_data"
# elif [[ $IRC_CLIENT == 'X-Chat' ]]; then # elif [[ $IRC_CLIENT == 'X-Chat' ]]; then
# qdbus org.xchat.service print "$print_data\n" # qdbus org.xchat.service print "$print_data\n"
else else
# the -n is needed to avoid double spacing of output in terminal # the -n is needed to avoid double spacing of output in terminal
echo -ne "$print_data\n" echo -ne "$print_data\n"
@ -2837,7 +2833,7 @@ get_start_client()
Irc_Client_Path=$( readlink /proc/$PPID/exe ) Irc_Client_Path=$( readlink /proc/$PPID/exe )
# Irc_Client_Path=$( ps -p $PPID | gawk '!/[[:space:]]*PID/ {print $5}' ) # Irc_Client_Path=$( ps -p $PPID | gawk '!/[[:space:]]*PID/ {print $5}' )
# echo $( ps -p $PPID ) # echo $( ps -p $PPID )
irc_client_path_lower=$( tr '[:upper:]' '[:lower:]' <<< $Irc_Client_Path ) irc_client_path_lower=${Irc_Client_Path,,}
App_Working_Name=${irc_client_path_lower##*/} App_Working_Name=${irc_client_path_lower##*/}
# handles the xchat/sh/bash/dash cases, and the konversation/perl cases, where clients # handles the xchat/sh/bash/dash cases, and the konversation/perl cases, where clients
# report themselves as perl or unknown shell. IE: when konversation starts inxi # report themselves as perl or unknown shell. IE: when konversation starts inxi
@ -2849,7 +2845,7 @@ get_start_client()
pppid="$( ps -p $PPID -o ppid --no-headers | sed 's/[[:space:]]//g' )" pppid="$( ps -p $PPID -o ppid --no-headers | sed 's/[[:space:]]//g' )"
if [[ -n $pppid && -f /proc/$pppid/exe ]];then if [[ -n $pppid && -f /proc/$pppid/exe ]];then
Irc_Client_Path="$( readlink /proc/$pppid/exe )" Irc_Client_Path="$( readlink /proc/$pppid/exe )"
irc_client_path_lower="$( tr '[:upper:]' '[:lower:]' <<< $Irc_Client_Path )" irc_client_path_lower=${Irc_Client_Path,,}
App_Working_Name=${irc_client_path_lower##*/} App_Working_Name=${irc_client_path_lower##*/}
B_Non_Native_App='true' B_Non_Native_App='true'
fi fi
@ -4919,7 +4915,7 @@ get_graphics_card_data()
IGNORECASE=1 IGNORECASE=1
busId="" busId=""
} }
/vga compatible controller/ { /vga compatible controller|display controller/ {
gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF) gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF)
gsub(/,/, " ", $NF) gsub(/,/, " ", $NF)
gsub(/^ +| +$/, "", $NF) gsub(/^ +| +$/, "", $NF)
@ -9378,7 +9374,7 @@ print_cpu_flags_full()
# note: sort only sorts lines, not words in a string, so convert to lines # note: sort only sorts lines, not words in a string, so convert to lines
local cpu_flags_full="$( echo $1 | tr " " "\n" | sort )" local cpu_flags_full="$( echo $1 | tr " " "\n" | sort )"
local a_cpu_flags='' line_starter='' temp_string='' local a_cpu_flags='' line_starter='' temp_string=''
local i=0 counter=0 starter_length=15 flag='' flag_data='' local i=0 counter=0 starter_length=0 flag='' flag_data=''
local line_length='' flag_feature='Flags' spacer='' flag_string='' local line_length='' flag_feature='Flags' spacer='' flag_string=''
if [[ $2 == 'true' ]];then if [[ $2 == 'true' ]];then
@ -9755,7 +9751,8 @@ print_info_data()
gcc_installed='N/A' gcc_installed='N/A'
fi fi
if [[ $B_EXTRA_EXTRA_DATA == 'true' && -n ${A_GCC_VERSIONS[1]} ]];then if [[ $B_EXTRA_EXTRA_DATA == 'true' && -n ${A_GCC_VERSIONS[1]} ]];then
gcc_others=" ${C1}alt$SEP3${C2} $( tr ',' '/' <<< ${A_GCC_VERSIONS[1]} )" # gcc_others=" ${C1}alt$SEP3${C2} $( tr ',' '/' <<< ${A_GCC_VERSIONS[1]} )"
gcc_others=" ${C1}alt$SEP3${C2} ${A_GCC_VERSIONS[1]//,//}"
fi fi
gcc_installed="${C1}Gcc sys$SEP3${C2} $gcc_installed$gcc_others " gcc_installed="${C1}Gcc sys$SEP3${C2} $gcc_installed$gcc_others "
fi fi
@ -10055,8 +10052,8 @@ print_module_version()
if [[ -z $( grep -E '^snd' <<< $modules ) ]];then if [[ -z $( grep -E '^snd' <<< $modules ) ]];then
prefix='snd_' # sound modules start with snd_ prefix='snd_' # sound modules start with snd_
fi fi
modules=$( tr '[A-Z]' '[a-z]' <<< $modules ) modules=${modules,,}
modules=$( tr '-' '_' <<< $modules ) modules=${modules//-/_}
# special intel processing, generally no version info though # special intel processing, generally no version info though
if [[ $modules == 'hda intel' ]];then if [[ $modules == 'hda intel' ]];then
modules='hda_intel' modules='hda_intel'

View file

@ -1,3 +1,22 @@
=====================================================================================
Version: 2.1.4
Patch Version: 00
Script Date: 2014-03-17
-----------------------------------
Changes:
-----------------------------------
New version. Some BSD fixes, and a more important fix, added 'display controller'
to graphics card detection, that's a new one on me. Dual card systems might use this.
00:02.0 Display controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
01:00.0 VGA compatible controller: NVIDIA Corporation NV44A [GeForce 6200] (rev a1)
Some more switches to bash native methods as well.
-----------------------------------
-- Harald Hope - Mon, 17 Mar 2014 19:23:42 -0700
===================================================================================== =====================================================================================
Version: 2.1.3 Version: 2.1.3
Patch Version: 00 Patch Version: 00