aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2014-03-21 13:55:50 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2014-03-21 13:55:50 -0400
commitf26952b3c23fe3db26d358e8c2706e050aa07c55 (patch)
tree5b21f5f50ca6200f456c48d79a65226678f41d0b
parent4b1bbb92c44859d60954ed9022efaf7a850df5c2 (diff)
downloadinxi-f26952b3c23fe3db26d358e8c2706e050aa07c55.tar.bz2
inxi-f26952b3c23fe3db26d358e8c2706e050aa07c55.tar.xz
inxi-f26952b3c23fe3db26d358e8c2706e050aa07c55.tar.zst
Imported Upstream version 2.1.7upstream/2.1.7
-rwxr-xr-xinxi68
-rwxr-xr-xinxi.changelog71
2 files changed, 112 insertions, 27 deletions
diff --git a/inxi b/inxi
index 8d38d86..625bfde 100755
--- a/inxi
+++ b/inxi
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
-#### Version: 2.1.3
-#### Date: 2014-03-16
+#### Version: 2.1.7
+#### Date: 2014-03-18
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@@ -959,7 +959,7 @@ initialize_paths()
IFS="$ORIGINAL_IFS"
PATH="$PATH$added_path"
- ##echo "PATH='$PATH'"
+ # echo "PATH='$PATH'"
##/bin/sh -c 'echo "PATH in subshell=\"$PATH\""'
}
@@ -1026,7 +1026,7 @@ check_required_apps()
if [[ $B_RUNNING_IN_DISPLAY == 'true' ]];then
for app_name in $x_apps
do
- if ! type -p $app_path &>/dev/null;then
+ if ! type -p $app_name &>/dev/null;then
script_debugger "Resuming in non X mode: $app_name not found. For package install advice run: $SCRIPT_NAME --recommends"
B_SHOW_DISPLAY_DATA='false'
break
@@ -1038,7 +1038,7 @@ check_required_apps()
for app_name in $depends
do
- if ! type -p $app_path &>/dev/null;then
+ if ! type -p $app_name &>/dev/null;then
error_handler 5 "$app_name"
fi
done
@@ -1530,16 +1530,22 @@ script_self_updater()
debug_data_collector()
{
local xiin_app='' xiin_data_file='' xiin_download='' error='' b_run_xiin='false'
- local debug_data_dir='' bsd_string=''
+ local debug_data_dir='' bsd_string='' xorg_d_files='' xorg_file=''
local completed_gz_file='' xiin_file='xiin.py' ftp_upload='ftp.techpatterns.com/incoming'
local Line='-------------------------'
local start_directory=$( pwd )
-
+ local host=$HOSTNAME
+ if [[ -n $host ]];then
+ host=${host// /-}
+ host="-${host,,}"
+ else
+ host="-no-host"
+ fi
if [[ -n $BSD_TYPE ]];then
- bsd_string="$BSD_TYPE-"
+ bsd_string="-$BSD_TYPE"
fi
- debug_data_dir="inxi-$bsd_string$(tr ' ' '-' <<< $HOSTNAME | tr '[A-Z]' '[a-z]' )-$1-$(date +%Y%m%d)"
+ debug_data_dir="inxi$bsd_string$host-$(date +%Y%m%d-%H%M%S)-$1"
if [[ $B_IRC == 'false' ]];then
if [[ -n $ALTERNATE_FTP ]];then
@@ -1574,6 +1580,7 @@ debug_data_collector()
lscpu &> $debug_data_dir/lscpu.txt
lspci &> $debug_data_dir/lspci.txt
lspci -n &> $debug_data_dir/lspci-n.txt
+ lspci -nn &> $debug_data_dir/lspci-nn.txt
lspci -v &> $debug_data_dir/lspci-v.txt
lsusb &> $debug_data_dir/lsusb.txt
ps aux &> $debug_data_dir/ps-aux.txt
@@ -1666,13 +1673,17 @@ debug_data_collector()
touch $debug_data_dir/no-xorg-log-file
fi
if [[ -e /etc/X11/xorg.conf ]];then
- cp /etc/X11/xorg.conf $SCRIPT_DATA_DIR/$debug_data_dir
+ cat /etc/X11/xorg.conf &> $debug_data_dir/xorg-conf.txt
else
touch $debug_data_dir/no-xorg-conf-file
fi
if [[ -n $( ls /etc/X11/xorg.conf.d/ 2>/dev/null ) ]];then
ls /etc/X11/xorg.conf.d &> $debug_data_dir/ls-etc-x11-xorg-conf-d.txt
- cp /etc/X11/xorg.conf.d $SCRIPT_DATA_DIR/$debug_data_dir
+ xorg_d_files=$(ls /etc/X11/xorg.conf.d)
+ for xorg_file in $xorg_d_files
+ do
+ cat /etc/X11/xorg.conf.d/$xorg_file &> $debug_data_dir/xorg-conf-d-$xorg_file.txt
+ done
else
touch $debug_data_dir/no-xorg-conf-d-files
fi
@@ -2029,18 +2040,14 @@ print_screen_output()
print_data="P: $print_data"
fi
fi
-
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
$print_data="$( tr '\n' ' ' <<< "$print_data" )"
dcop "$DCPORT" "$DCOPOBJ" say "$DCSERVER" "$DCTARGET" "$print_data"
-
elif [[ $KONVI -eq 3 && $B_QDBUS == 'true' ]]; then ## dbus Konversation (> 1.2 (qt4))
qdbus org.kde.konversation /irc say "$DCSERVER" "$DCTARGET" "$print_data"
-
# elif [[ $IRC_CLIENT == 'X-Chat' ]]; then
# qdbus org.xchat.service print "$print_data\n"
-
else
# the -n is needed to avoid double spacing of output in terminal
echo -ne "$print_data\n"
@@ -2837,7 +2844,7 @@ get_start_client()
Irc_Client_Path=$( readlink /proc/$PPID/exe )
# Irc_Client_Path=$( ps -p $PPID | gawk '!/[[:space:]]*PID/ {print $5}' )
# 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##*/}
# 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
@@ -2849,7 +2856,7 @@ get_start_client()
pppid="$( ps -p $PPID -o ppid --no-headers | sed 's/[[:space:]]//g' )"
if [[ -n $pppid && -f /proc/$pppid/exe ]];then
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##*/}
B_Non_Native_App='true'
fi
@@ -4918,14 +4925,23 @@ get_graphics_card_data()
BEGIN {
IGNORECASE=1
busId=""
+ trueCard=""
}
- /vga compatible controller/ {
+ # not using 3D controller yet, needs research: |3D controller |display controller
+ # note: this is strange, but all of these can be either a separate or the same
+ # card. However, by comparing bus id, say: 00:02.0 we can determine that the
+ # cards are either the same or different. We want only the .0 version as a valid
+ # card. .1 would be for example: Display Adapter with bus id x:xx.1, not the right one
+ /vga compatible controller|3D controller|Display controller/ {
gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF)
gsub(/,/, " ", $NF)
gsub(/^ +| +$/, "", $NF)
gsub(/ [ \t]+/, " ", $NF)
busId=gensub(/^([0-9a-f:\.]+) (.+)$/,"\\1","",$1)
- print $NF "," busId
+ trueCard=gensub(/(.*)\.([0-9]+)$/,"\\2","",busId)
+ if ( trueCard == 0 ) {
+ print $NF "," busId
+ }
}' <<< "$Lspci_v_Data" ) )
IFS="$ORIGINAL_IFS"
# for (( i=0; i < ${#A_GRAPHICS_CARD_DATA[@]}; i++ ))
@@ -7206,10 +7222,8 @@ EOF"
if ( device == "" ) {
device=vendor
}
-
fullLine=class "," device "," vendor "," driver "," pciId "," chipId
print fullLine
-
}' <<< "$pciconf_data" ))
IFS="$ORIGINAL_IFS"
fi
@@ -9378,7 +9392,7 @@ print_cpu_flags_full()
# note: sort only sorts lines, not words in a string, so convert to lines
local cpu_flags_full="$( echo $1 | tr " " "\n" | sort )"
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=''
if [[ $2 == 'true' ]];then
@@ -9755,7 +9769,8 @@ print_info_data()
gcc_installed='N/A'
fi
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
gcc_installed="${C1}Gcc sys$SEP3${C2} $gcc_installed$gcc_others "
fi
@@ -9830,7 +9845,6 @@ print_info_data()
fi
# info_data="$info_data"
closing_data="$client_data${C1}$SCRIPT_NAME$SEP3${C2} $SCRIPT_VERSION_NUMBER$patch_version_number"
-
# sometimes gcc is very long, and default runlevel can be long with systemd, so create a gcc-less line first
if [[ $( calculate_line_length "$info_data$init_data$gcc_installed" ) -gt $COLS_INNER ]];then
# info_data=$info_data
@@ -9870,7 +9884,7 @@ print_info_data()
eval $LOGFE
}
-
+#print_info_data;exit
print_machine_data()
{
eval $LOGFS
@@ -10055,8 +10069,8 @@ print_module_version()
if [[ -z $( grep -E '^snd' <<< $modules ) ]];then
prefix='snd_' # sound modules start with snd_
fi
- modules=$( tr '[A-Z]' '[a-z]' <<< $modules )
- modules=$( tr '-' '_' <<< $modules )
+ modules=${modules,,}
+ modules=${modules//-/_}
# special intel processing, generally no version info though
if [[ $modules == 'hda intel' ]];then
modules='hda_intel'
diff --git a/inxi.changelog b/inxi.changelog
index 8af9695..a20b5d8 100755
--- a/inxi.changelog
+++ b/inxi.changelog
@@ -1,4 +1,75 @@
=====================================================================================
+Version: 2.1.7
+Patch Version: 00
+Script Date: 2014-03-18
+-----------------------------------
+Changes:
+-----------------------------------
+new version, attempt 2 at detecting all possible syntaxes for cards. Now using
+the bus id itself to determine if the
+VGA compatible controller
+3D controller
+Display Controller
+refer to separate chips or the same one.
+
+Bus id gives the data needed, because the video chip, the real card, that is,
+is on for example 00:05.0 the trailing .0 is the key, that's the actual card.
+
+The audio or display controller for the same card would be for example: 00:05.1
+
+I don't know if this is fully reliable, but it will have to do, either some cards
+as is get missed, or some cards get double id'ed, unless I use a hack like this.
+
+There's nothing else I can find but the bus id to determine that it's the same
+physical device or not.
+
+-----------------------------------
+-- Harald Hope - Tue, 18 Mar 2014 21:18:27 -0700
+
+=====================================================================================
+Version: 2.1.6
+Patch Version: 00
+Script Date: 2014-03-18
+-----------------------------------
+Changes:
+-----------------------------------
+new version, bug fix, adding 3D controller to output causes doubled card id in some cases.
+
+-----------------------------------
+-- Harald Hope - Tue, 18 Mar 2014 19:17:55 -0700
+
+=====================================================================================
+Version: 2.1.5
+Patch Version: 00
+Script Date: 2014-03-17
+-----------------------------------
+Changes:
+-----------------------------------
+New version, serious bug fix, do NOT use 2.1.4, it will fail to start. Bad copy/paste.
+
+-----------------------------------
+-- Harald Hope - Tue, 18 Mar 2014 01:30:53 -0700
+
+=====================================================================================
+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
Patch Version: 00
Script Date: 2014-03-15