summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinxi362
-rw-r--r--inxi.173
-rw-r--r--inxi.1.gzbin11062 -> 11753 bytes
-rw-r--r--inxi.changelog153
4 files changed, 482 insertions, 106 deletions
diff --git a/inxi b/inxi
index 87276fd..2b658e5 100755
--- a/inxi
+++ b/inxi
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
-#### Version: 2.3.5
-#### Date: 2016-12-02
+#### Version: 2.3.11
+#### Date: 2017-05-31
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@@ -20,7 +20,8 @@
#### Gaim/Pidgin, Weechat, KVIrc and Kopete.
#### Original infobash author and copyright holder:
#### Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif
-#### inxi version: Copyright (C) 2008-2016 Scott Rogers & Harald Hope
+#### inxi version: Copyright (C) 2008-2017 Harald Hope
+#### Additional features (C) Scott Rogers - kde, cpu info
#### Further fixes (listed as known): Horst Tritremmel <hjt at sidux.com>
#### Steven Barrett (aka: damentz) - usb audio patch; swap percent used patch
#### Jarett.Stevens - dmidecde -M patch for older systems with the /sys
@@ -470,18 +471,18 @@ HDDTEMP_PATH=''
MODINFO_PATH=''
SUDO_PATH=''
-SCRIPT_DATA_DIR="$HOME/.inxi"
ALTERNATE_FTP='' # for data uploads
ALTERNATE_WEATHER_LOCATION='' # weather alternate location
-LOG_FILE="$SCRIPT_DATA_DIR/inxi.log"
-LOG_FILE_1="$SCRIPT_DATA_DIR/inxi.1.log"
-LOG_FILE_2="$SCRIPT_DATA_DIR/inxi.2.log"
+SCRIPT_CONFIG_DIR=''
+SCRIPT_DATA_DIR=''
+LOG_FILE='inxi.log'
+LOG_FILE_1='inxi.1.log'
+LOG_FILE_2='inxi.2.log'
MAN_FILE_DOWNLOAD='https://github.com/smxi/inxi/raw/master/inxi.1.gz'
-MAN_FILE_LOCATION='/usr/share/man/man1'
SCRIPT_NAME='inxi'
SCRIPT_PATCH_NUMBER=''
-SCRIPT_PATH='' #filled-in in Main
-SCRIPT_VERSION_NUMBER="" #filled-in in Main
+SCRIPT_PATH='' # filled-in in Main
+SCRIPT_VERSION_NUMBER='' # filled-in in Main
SCRIPT_DOWNLOAD='https://github.com/smxi/inxi/raw/master/'
SCRIPT_DOWNLOAD_BRANCH_1='https://github.com/smxi/inxi/raw/one/'
SCRIPT_DOWNLOAD_BRANCH_2='https://github.com/smxi/inxi/raw/two/'
@@ -677,6 +678,9 @@ USB_NETWORK_SEARCH="$USB_NETWORK_SEARCH|050d:935b|0bda:8189|0bda:8197"
########################################################################
main()
{
+ # This must be set first so log paths are present when logging starts.
+ set_user_paths
+
eval $LOGFS
local color_scheme='' kde_config_app=''
@@ -692,9 +696,10 @@ main()
source /etc/$SCRIPT_NAME.conf
fi
# Source user config variables override /etc/inxi.conf variables
- if [[ -s $HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf ]];then
- source $HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf
+ if [[ -s $SCRIPT_CONFIG_DIR/$SCRIPT_NAME.conf ]];then
+ source $SCRIPT_CONFIG_DIR/$SCRIPT_NAME.conf
fi
+
set_display_width 'live' # can be reset with -y
# echo SCHEME $SCHEME
@@ -826,6 +831,49 @@ main()
exit 0
}
+set_user_paths()
+{
+ local b_conf='false' b_data='false'
+
+ if [[ -n $XDG_CONFIG_HOME ]];then
+ SCRIPT_CONFIG_DIR=$XDG_CONFIG_HOME
+ b_conf=true
+ elif [[ -d $HOME/.config ]];then
+ SCRIPT_CONFIG_DIR=$HOME/.config
+ b_conf=true
+ else
+ SCRIPT_CONFIG_DIR="$HOME/.$SCRIPT_NAME"
+ fi
+ if [[ -n $XDG_DATA_HOME ]];then
+ SCRIPT_DATA_DIR=$XDG_DATA_HOME/$SCRIPT_NAME
+ b_data=true
+ elif [[ -d $HOME/.local/share ]];then
+ SCRIPT_DATA_DIR=$HOME/.local/share/$SCRIPT_NAME
+ b_data=true
+ else
+ SCRIPT_DATA_DIR="$HOME/.$SCRIPT_NAME"
+ fi
+ # note, this used to be created/checked in specific instance, but we'll just do it
+ # universally so it's done at script start.
+ if [[ ! -d $SCRIPT_DATA_DIR ]];then
+ mkdir $SCRIPT_DATA_DIR
+ fi
+
+ if [[ $b_conf == 'true' && -f $HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf ]];then
+ mv -f $HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf $SCRIPT_CONFIG_DIR
+ echo "Moved $SCRIPT_NAME.conf from $HOME/.$SCRIPT_NAME to $SCRIPT_CONFIG_DIR"
+ fi
+ if [[ $b_data == 'true' && -d $HOME/.$SCRIPT_NAME ]];then
+ mv -f $HOME/.$SCRIPT_NAME/* $SCRIPT_DATA_DIR
+ rm -Rf $HOME/.$SCRIPT_NAME
+ echo "Moved data dir $HOME/.$SCRIPT_NAME to $SCRIPT_DATA_DIR"
+ fi
+
+ LOG_FILE=$SCRIPT_DATA_DIR/$LOG_FILE
+ LOG_FILE_1=$SCRIPT_DATA_DIR/$LOG_FILE_1
+ LOG_FILE_2=$SCRIPT_DATA_DIR/$LOG_FILE_2
+}
+
#### -------------------------------------------------------------------
#### basic tests: set script data, booleans, PATH, version numbers
#### -------------------------------------------------------------------
@@ -1210,7 +1258,7 @@ select_default_color_scheme()
{
eval $LOGFS
local spacer=' ' options='' user_selection='' config_variable=''
- local config_file="$HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf"
+ local config_file="$SCRIPT_CONFIG_DIR/$SCRIPT_NAME.conf"
local irc_clear=""
local irc_gui='Unset' irc_console='Unset' irc_x_term='Unset'
local console='Unset' virt_term='Unset' global='Unset'
@@ -1307,9 +1355,6 @@ select_default_color_scheme()
set_color_scheme $user_selection
# make file/directory first if missing
if [[ ! -f $config_file ]];then
- if [[ ! -d $HOME/.$SCRIPT_NAME ]];then
- mkdir $HOME/.$SCRIPT_NAME
- fi
touch $config_file
fi
if [[ -z $( grep -s "$config_variable=" $config_file ) ]];then
@@ -1533,9 +1578,6 @@ log_function_data()
# will have max 3 files, inxi.log, inxi.1.log, inxi.2.log
create_rotate_logfiles()
{
- if [[ ! -d $SCRIPT_DATA_DIR ]];then
- mkdir $SCRIPT_DATA_DIR
- fi
# do the rotation if logfile exists
if [[ -f $LOG_FILE ]];then
# copy if present second to third
@@ -1561,7 +1603,8 @@ script_self_updater()
{
eval $LOGFS
local downloader_error=0 file_contents='' downloader_man_error=0
- local man_file_path="$MAN_FILE_LOCATION/inxi.1.gz"
+ local man_file_location=$( set_man_location )
+ local man_file_path="$man_file_location/inxi.1.gz"
if [[ $B_IRC == 'true' ]];then
print_screen_output "Sorry, you can't run the $SCRIPT_NAME self updater option (-$3) in an IRC client."
@@ -1603,14 +1646,14 @@ script_self_updater()
print_screen_output "To run the new version, just start $SCRIPT_NAME again."
print_screen_output "----------------------------------------"
print_screen_output "Starting download of man page file now."
- if [[ ! -d $MAN_FILE_LOCATION ]];then
- print_screen_output "The required man directory was not detected on your system, unable to continue: $MAN_FILE_LOCATION"
+ if [[ ! -d $man_file_location ]];then
+ print_screen_output "The required man directory was not detected on your system, unable to continue: $man_file_location"
else
if [[ $B_ROOT == 'true' ]];then
print_screen_output "Checking Man page download URL..."
if [[ -f /usr/share/man/man8/inxi.8.gz ]];then
print_screen_output "Updating man page location to man1."
- mv -f /usr/share/man/man8/inxi.8.gz /usr/share/man/man1/inxi.1.gz
+ mv -f /usr/share/man/man8/inxi.8.gz $man_file_location/inxi.1.gz
if type -p mandb &>/dev/null;then
exec $( type -p mandb ) -q
fi
@@ -1650,7 +1693,7 @@ script_self_updater()
print_screen_output "Man file download URL failed, unable to continue: $MAN_FILE_DOWNLOAD"
fi
else
- print_screen_output "Updating / Installing the Man page requires root user, writing to: $MAN_FILE_LOCATION"
+ print_screen_output "Updating / Installing the Man page requires root user, writing to: $man_file_location"
print_screen_output "If you want the man page, you'll have to run $SCRIPT_NAME -$3 as root."
fi
fi
@@ -1671,6 +1714,40 @@ script_self_updater()
eval $LOGFS
}
+set_man_location()
+{
+ local location='' default_location='/usr/share/man/man1'
+ local man_paths=$(man --path 2>/dev/null) man_local='/usr/local/share/man'
+ local b_use_local=false
+
+ if [[ -n "$man_paths" && -n $( grep $man_local <<< "$man_paths" ) ]];then
+ b_use_local=true
+ fi
+
+ # for distro installs, existing inxi man manual installs, do nothing
+ if [[ -f $default_location/inxi.1.gz ]];then
+ location=$default_location
+ else
+ if [[ $b_use_local == 'true' ]];then
+ if [[ ! -d $man_local/man1 ]];then
+ mkdir $man_local/man1
+ fi
+ location="$man_local/man1"
+ fi
+# print_screen_output "Updating man page location to man1."
+# mv -f /usr/share/man/man1/inxi.1.gz /usr/local/share/man/man1/inxi.1.gz
+# if type -p mandb &>/dev/null;then
+# exec $( type -p mandb ) -q
+# fi
+ fi
+
+ if [[ -z "$location" ]];then
+ location=$default_location
+ fi
+
+ echo $location
+}
+
# args: $1 - debug data type: sys|xorg|disk
debug_data_collector()
{
@@ -1706,11 +1783,6 @@ debug_data_collector()
ftp_upload=$ALTERNATE_FTP
fi
echo "Starting debugging data collection type: $1"
- echo -n "Checking/creating required directories... "
- if [[ ! -d $SCRIPT_DATA_DIR ]];then
- mkdir $SCRIPT_DATA_DIR
- fi
- echo 'completed'
cd $SCRIPT_DATA_DIR
if [[ -d $SCRIPT_DATA_DIR/$debug_data_dir ]];then
echo 'Deleting previous xiin data directory...'
@@ -1887,6 +1959,10 @@ debug_data_collector()
# bsd data
cat /var/run/dmesg.boot &> $debug_data_dir/bsd-var-run-dmesg.boot.txt
echo $COLS_INNER &> $debug_data_dir/cols-inner.txt
+ echo $XDG_CONFIG_HOME &> $debug_data_dir/xdg_config_home.txt
+ echo $XDG_CONFIG_DIRS &> $debug_data_dir/xdg_config_dirs.txt
+ echo $XDG_DATA_HOME &> $debug_data_dir/xdg_data_home.txt
+ echo $XDG_DATA_DIRS &> $debug_data_dir/xdg_data_dirs.txt
check_recommends_user_output &> $debug_data_dir/check-recommends-user-output.txt
# first download and verify xiin
@@ -3055,7 +3131,7 @@ show_options()
print_lines_basic "2" "-D" "Hdd temp with disk data if you have hddtemp installed, if you are root OR if you have added to /etc/sudoers (sudo v. 1.7 or newer) Example:^<username>^ALL^=^NOPASSWD:^/usr/sbin/hddtemp"
print_lines_basic "2" "-G" "Direct rendering status for Graphics (in X)."
print_lines_basic "2" "-G" "(for single gpu, nvidia driver) screen number gpu is running on."
- print_lines_basic "2" "-i" "IPv6 as well for LAN interface (IF) devices."
+ print_lines_basic "2" "-i" "For IPv6, show additional IP v6 scope addresses: Global, Site, Temporary, Unknown."
print_lines_basic "2" "-I" "System GCC, default. With -xx, also show other installed GCC versions. If running in console, not in IRC client, shows shell version number, if detected. Init/RC Type and runlevel (if available)."
print_lines_basic "2" "-m" "Part number; Max memory module size (if available)."
print_lines_basic "2" "-N -A" "Version/port(s)/driver version (if available) for Network/Audio;"
@@ -5955,7 +6031,7 @@ get_dmidecode_data()
sub(/^[[:space:]]+/, "", twoData)
sub(/^Base Board .*|^Chassis .*|empty|.*O\.E\.M\..*|.*OEM.*|^Not .*|^System .*|.*unknow.*|.*N\/A.*|none|^To be filled.*|^0x[0]+$|\[Empty\]|<Bad Index>|^\.\.$/, "", twoData)
sub(/.*(AssetTagNum|Manufacturer| Or Motherboard|PartNum.*|SerNum).*/, "", twoData)
- gsub(/bios|acpi/, "", twoData)
+ gsub(/\ybios\y|\yacpi\y/, "", twoData) # note: biostar
sub(/http:\/\/www.abit.com.tw\//, "Abit", twoData)
# for double indented values replace with ~ so later can test for it, we are trusting that
@@ -6193,8 +6269,8 @@ get_graphics_card_data()
gsub(/'"$BAN_LIST_ARRAY"'/, " ", $NF)
gsub(/^ +| +$/, "", $NF)
gsub(/ [ \t]+/, " ", $NF)
- busId=gensub(/^([0-9a-f:\.]+) (.+)$/,"\\1","",$1)
- trueCard=gensub(/(.*)\.([0-9]+)$/,"\\2","",busId)
+ busId=gensub(/^([0-9a-f:\.]+) (.+)$/,"\\1",1,$1)
+ trueCard=gensub(/(.*)\.([0-9]+)$/,"\\2",1,busId)
if ( trueCard == 0 ) {
print $NF "," busId
}
@@ -6217,7 +6293,7 @@ get_graphics_driver()
eval $LOGFS
# list is from sgfxi plus non-free drivers
- local driver_list='amdgpu|apm|ark|ati|chips|cirrus|cyrix|fbdev|fglrx|glint|i128|i740|i810|iftv|imstt|intel|ivtv|mach64|mesa|mga|modesetting|neomagic|newport|nouveau|nsc|nvidia|nv|openchrome|radeonhd|radeon|rendition|s3virge|s3|savage|siliconmotion|sisusb|sis|tdfx|tga|trident|tseng|unichrome|v4l|vboxvideo|vesa|vga|via|vmware|voodoo'
+ local driver_list='amdgpu|apm|ark|ati|chips|cirrus|cyrix|fbdev|fglrx|glint|i128|i740|i810|iftv|imstt|intel|ivtv|mach64|mesa|mga|modesetting|neomagic|newport|nouveau|nsc|nvidia|nv|openchrome|radeonhd|radeon|rendition|s3virge|s3|savage|siliconmotion|sisimedia|sisusb|sis|tdfx|tga|trident|tseng|unichrome|v4l|vboxvideo|vesa|vga|via|vmware|voodoo'
local driver='' driver_string='' xorg_log_data='' status='' a_temp=''
if [[ $B_XORG_LOG == 'true' ]];then
@@ -6442,7 +6518,7 @@ get_graphics_display_server_data()
vendorRelease=""
}
/vendor string/ {
- gsub(/the|inc|foundation|project|corporation/, "", $2)
+ gsub(/\ythe\y|\yinc\y|foundation|project|corporation/, "", $2)
gsub(/'"$BAN_LIST_ARRAY"'/, " ", $2)
gsub(/^ +| +$/, "", $2)
gsub(/ [ \t]+/, " ", $2)
@@ -6584,6 +6660,7 @@ get_hdd_data_basic()
fi
# echo ss: $swap_size
hdd_data="$( eval $df_string )"
+
# eval $df_string | awk 'BEGIN{tot=0} !/total/ {tot+=$4} END{print tot}'
log_function_data 'raw' "hdd_data:\n$hdd_data"
hdd_used=$( echo "$hdd_data" | gawk -v bsdType="$BSD_TYPE" -v swapSize="$swap_size" '
@@ -7014,7 +7091,7 @@ get_hdd_temp_data()
{
eval $LOGFS
local hdd_temp='' sudo_command=''
-
+
if [[ $B_HDDTEMP_TESTED != 'true' ]];then
B_HDDTEMP_TESTED='true'
HDDTEMP_PATH=$( type -p hddtemp )
@@ -7138,6 +7215,24 @@ get_init_data()
eval $LOGFE
}
+# note: useless because this is just absurdly inaccurate, too bad...
+get_install_date()
+{
+ eval $LOGFS
+
+ local installed=''
+
+ if ls -al --time-style '+FORMAT %Y-%m-%d' /usr 2>/dev/null;then
+ installed=$(ls -al --time-style '+FORMAT %Y-%m-%d' / | awk '/lost\+found/ {print $7;exit}' )
+# elif
+# :
+ fi
+
+ echo $installed
+
+ eval $LOGFE
+}
+
get_kernel_compiler_version()
{
# note that we use gawk to get the last part because beta, alpha, git versions can be non-numeric
@@ -7280,7 +7375,7 @@ get_machine_data()
# System manufacturer|System Product Name|System Version
# To Be Filled By O.E.M.
sub(/^Base Board .*|^Chassis .*|.*O\.E\.M\..*|.*OEM.*|^Not .*|^System .*|.*unknow.*|.*N\/A.*|none|^To be filled.*/, "", $0)
- gsub(/bios|acpi/, "", $0)
+ gsub(/\ybios\y|\yacpi\y/, "", $0) # note: biostar
sub(/http:\/\/www.abit.com.tw\//, "Abit", $0)
gsub(/^ +| +$/, "", $0)
gsub(/ [ \t]+/, " ", $0)
@@ -7998,8 +8093,11 @@ get_networking_local_ip_data()
gawk -v ipTool=$ip_tool -v bsdType=$BSD_TYPE '
BEGIN {
IGNORECASE=1
+ addExtV6 = ""
+ addIpV6 = ""
interface=""
- ifIp=""
+ ipExtV6=""
+ ifIpV4=""
ifIpV6=""
ifMask=""
}
@@ -8018,49 +8116,110 @@ get_networking_local_ip_data()
interface = $1
# prep this this for ip addr: eth0:
sub(/:/, "", interface)
- ifIp=""
+ ifIpV4=""
ifIpV6=""
ifMask=""
+ ipExtV6=""
aInterfaces[interface]++
-
+
while (getline && !/^$/ ) {
+ addIpV6 = ""
+ addExtV6 = ""
if ( ipTool == "ifconfig" ) {
if (/inet addr:/) {
- ifIp = gensub( /addr:([0-9\.]+)/, "\\1", "g", $2 )
+ ifIpV4 = gensub( /addr:([0-9\.]+)/, "\\1", "g", $2 )
if (/mask:/) {
ifMask = gensub( /mask:([0-9\.]+)/, "\\1", "g", $NF )
}
}
if (/inet6 addr:/) {
- ifIpV6 = $3
+ # ^fe80:
+ if ( $2 ~ /^fe80/) {
+ addIpV6 = $2
+ }
+ else if ( $0 ~ /<global>/ || $0 ~ /Scope:Global/ ) {
+ addExtV6 = "sg~" $2
+ }
+ # ^fec0:
+ else if ( $0 ~ /<site>/ || $0 ~ /Scope:Site/ || $2 ~ /^fec0/ || $2 ~ /^fc00/) {
+ addExtV6 = "ss~" $2
+ }
+ else {
+ addExtV6 = "su~" $2
+ }
}
if ( bsdType == "bsd" ) {
if ( $1 == "inet" ) {
- ifIp = $2
+ ifIpV4 = $2
if ( $3 == "netmask" ) {
ifMask = $4
}
}
- if ( $0 ~ /inet6.*%/ ) {
+ # bsds end ip with %em1 (% + interface name)
+ if ( $0 ~ /inet6.*%/ ){
sub(/%.*/,"",$2)
- ifIpV6 = $2
+ if ( $2 ~ /^fe80/ ) {
+ addIpV6 = $2
+ }
+ else if ( $2 ~ /^fec0/ || $2 ~ /^fc00/ ) {
+ addExtV6 = "ss~" $2
+ }
+ else {
+ addExtV6 = "sg~" $2
+ }
}
}
}
else if ( ipTool == "ip" ) {
if ( $1 == "inet" ) {
- ifIp = $2
+ ifIpV4 = $2
+ }
+ if ( $1 == "inet6" ){
+ # filter out deprecated IPv6 privacy addresses
+ if ( $0 ~ / temporary deprecated/) {
+ addExtV6 = ""
+ }
+ else if ( $0 ~ /scope global temporary/) {
+ addExtV6 = "st~" $2
+ }
+ else if ( $0 ~ /scope global/) {
+ addExtV6 = "sg~" $2
+ }
+ # ^fe80:
+ else if ( $2 ~ /^fe80/ || $0 ~ /scope link/) {
+ addIpV6 = $2
+ }
+ # ^fec0:
+ else if ( $2 ~ /^fec0/ || $2 ~ /^fc00/ || $0 ~ /scope site/) {
+ addExtV6 = "ss~" $2
+ }
+ else {
+ addExtV6 = "su~" $2
+ }
+ }
+ }
+ if ( addIpV6 != "" ) {
+ if ( ifIpV6 == "" ) {
+ ifIpV6 = addIpV6
}
- if ( $1 == "inet6" ) {
- ifIpV6 = $2
+ else {
+ ifIpV6 = ifIpV6 "^" addIpV6
+ }
+ }
+ if (addExtV6 != "" ){
+ if ( ipExtV6 == "" ){
+ ipExtV6 = addExtV6
+ }
+ else {
+ ipExtV6 = ipExtV6 "^" addExtV6
}
}
}
# slice off the digits that are sometimes tacked to the end of the address,
# like: /64 or /24
- sub(/\/[0-9]+/, "", ifIp)
- sub(/\/[0-9]+/, "", ifIpV6)
- ipAddresses[interface] = ifIp "," ifMask "," ifIpV6
+ sub(/\/[0-9]+/, "", ifIpV4)
+ gsub(/\/[0-9]+/, "", ifIpV6) #
+ ipAddresses[interface] = ifIpV4 "," ifMask "," ifIpV6 "," ipExtV6
}
END {
j=0
@@ -13420,6 +13579,7 @@ print_network_advanced_data()
print_networking_ip_data()
{
eval $LOGFS
+ # $ip should be IPv4
local ip=$( get_networking_wan_ip_data )
local wan_ip_data='' a_interfaces_working='' interfaces='' i=0
local if_id='' if_ip='' if_ipv6='' if_ipv6_string='' full_string='' if_string=''
@@ -13451,60 +13611,85 @@ print_networking_ip_data()
if [[ -n ${a_interfaces_working[1]} ]];then
if [[ $B_OUTPUT_FILTER == 'true' ]];then
if_ip=$FILTER_STRING
+ # we could filter each ipv6 extra address, but that can lead to
+ # a LOT of pointless output depending on the ip tool used and how
+ # many deprecated addresses there are, so just delete the values
+ a_interfaces_working[4]=''
else
if_ip=${a_interfaces_working[1]}
fi
fi
if_ip_string=" ${C1}ip-v4$SEP3${C2} $if_ip"
- if [[ $B_EXTRA_DATA == 'true' ]];then
- if [[ -n ${a_interfaces_working[3]} ]];then
- if [[ $B_OUTPUT_FILTER == 'true' ]];then
- if_ipv6=$FILTER_STRING
- else
- if_ipv6=${a_interfaces_working[3]}
- fi
+ # this is now going to always show as IPv6 starts to really be used globally
+ if [[ -n ${a_interfaces_working[3]} ]];then
+ if [[ $B_OUTPUT_FILTER == 'true' ]];then
+ if_ipv6=$FILTER_STRING
+ else
+ # may be more than one address here; get them all as one string
+ # but this is only the LINK scope, not Site or Global or Temporary
+ if_ipv6=${a_interfaces_working[3]/^/, }
fi
- if_ipv6_string=" ${C1}ip-v6$SEP3${C2} $if_ipv6"
fi
+ if_ipv6_string=" ${C1}ip-v6-link$SEP3${C2} $if_ipv6"
fi
if [[ -n ${a_interfaces_working[0]} ]];then
if_id=${a_interfaces_working[0]}
fi
if_string="${C1}IF$SEP3${C2} $if_id$if_ip_string$if_ipv6_string "
- # first line, print wan on its own line if too long
+ # first line, print wan on its own line, then the next item
if [[ $i -eq 0 ]];then
- if [[ $( calculate_line_length "$wan_ip_data$if_string" ) -gt $COLS_INNER ]];then
- full_string=$( create_print_line " " "$wan_ip_data" )
- print_screen_output "$full_string"
- wan_ip_data=''
- full_string=$( create_print_line " " "$if_string" )
- print_screen_output "$full_string"
- if_string=''
- else
- full_string=$( create_print_line " " "$wan_ip_data$if_string" )
- print_screen_output "$full_string"
- wan_ip_data=''
- if_string=''
- fi
- else
- if [[ $( calculate_line_length "$if_string_holding$if_string" ) -gt $COLS_INNER ]];then
- if [[ -n $if_string_holding ]];then
- full_string=$( create_print_line " " "$if_string_holding" )
- print_screen_output "$full_string"
- fi
- if_string_holding="$if_string"
- else
- if_string_holding="$if_string_holding$if_string"
- fi
+ full_string=$( create_print_line " " "$wan_ip_data" )
+ print_screen_output "$full_string"
+ wan_ip_data=''
+ fi
+ full_string=$( create_print_line " " "$if_string" )
+ print_screen_output "$full_string"
+ if_string=''
+ if [[ ${a_interfaces_working[4]} != '' && $B_EXTRA_DATA == 'true' ]];then
+ IFS="^"
+ a_ipv6_ext=(${a_interfaces_working[4]})
+ IFS="$ORIGINAL_IFS"
+ for (( j=0; j < ${#a_ipv6_ext[@]}; j++ ))
+ do
+ print_ipv6_ext_line "${a_ipv6_ext[j]}"
+ done
fi
((i++))
done
- # then print out anything not printed already
- if [[ -n $if_string_holding ]];then
- full_string=$( create_print_line " " "$if_string_holding" )
- print_screen_output "$full_string"
+ eval $LOGFE
+}
+print_ipv6_ext_line()
+{
+ eval $LOGFS
+
+ local full_string='' ip_starter='' ip_data='' ip=''
+
+ case $1 in
+ sg~*)
+ ip_starter="ip-v6-global"
+ ip=${1/sg~/}
+ ;;
+ ss~*)
+ ip_starter="ip-v6-site"
+ ip=${1/ss~/}
+ ;;
+ st~*)
+ ip_starter="ip-v6-temporary"
+ ip=${1/st~/}
+ ;;
+ su~*)
+ ip_starter="ip-v6-unknown"
+ ip=${1/su~/}
+ ;;
+ esac
+ if [[ $B_OUTPUT_FILTER == 'true' ]];then
+ ip=$FILTER_STRING
fi
+ ip_data="${C1}$ip_starter$SEP3${C2} $ip"
+ full_string=$( create_print_line " " "$ip_data" )
+ print_screen_output "$full_string"
+
eval $LOGFE
}
@@ -14963,7 +15148,8 @@ print_weather_data()
country=" $openP${a_location[5]}$closeP"
fi
if [[ -n ${a_weather[10]} ]];then
- altitude=" ${C1}Altitude$SEP3${C2} ${a_weather[10]}"
+ # note: bug in source data uses ft for meters, not 100% of time, but usually
+ altitude=" ${C1}Altitude$SEP3${C2} ${a_weather[10]/ft/m}"
fi
location_string="${C1}Location$SEP3${C2}$city$state$country$altitude "
else
diff --git a/inxi.1 b/inxi.1
index 9b97a30..c2cb5ae 100644
--- a/inxi.1
+++ b/inxi.1
@@ -1,4 +1,4 @@
-.TH INXI 1 "2016\-11\-03" inxi "inxi manual"
+.TH INXI 1 "2017\-05\-31" inxi "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
.SH SYNOPSIS
@@ -141,9 +141,10 @@ The help menu, plus developer options. Do not use dev options in normal
operation!
.TP
.B \-i
-Show Wan IP address, and shows local interfaces (requires ifconfig network tool).
+Show Wan IP address, and shows local interfaces (requires \fBifconfig\fR or \fBip\fR network tool).
Same as \-Nni. Not shown with \fB\-F\fR for user security reasons, you shouldn't
-paste your local/wan IP.
+paste your local/wan IP. Shows both IPv4 and IPv6 link IP address.
+
.TP
.B \-I
Show Information: processes, uptime, memory, irc client (or shell type if run in shell, not irc), inxi version.
@@ -261,11 +262,17 @@ Show partition UUIDs. Default: short partition \fB\-P\fR. For full \fB\-p\fR out
.B \-U
Note \- Maintainer may have disabled this function.
-If inxi \fB\-h\fR has no listing for \fB\-U\fR then its disabled.
+If inxi \fB\-h\fR has no listing for \fB\-U\fR then it's disabled.
Auto\-update script. Note: if you installed as root, you must be root to update,
-otherwise user is fine. Also installs / updates this Man Page to: \fB/usr/share/man/man1\fR
+otherwise user is fine. Also installs / updates this Man Page to: \fB/usr/local/share/man/man1\fR
+(if \fB/usr/local/share/man/\fR exists AND there is no inxi man page in \fB/usr/share/man/man1\fR,
+otherwise it goes to \fB/usr/share/man/man1\fR)
This requires that you be root to write to that directory.
+
+Previous versions of inxi manually installed man page were installed to \fB/usr/share/man/man1\fR. If
+you want the man page to go into \fB/usr/local/share/man/man1\fR move it there and inxi will update to
+that path from then on.
.TP
.B \-V
inxi version information. Prints information then exits.
@@ -371,7 +378,24 @@ The following shows which lines / items get extra information with each extra da
\- Shows PCI Bus ID/Usb ID number of each Graphics card.
.TP
.B \-x \-i
-\- Show IPv6 as well for LAN interface (IF) devices.
+\- Show IP v6 additional scope data, like Global, Site, Temporary for each interface.
+
+Note that there is no way I am aware of to filter out the deprecated IP v6 scope site/global
+temporary addresses from the output of \fBifconfig\fR. \fBip\fR tool shows that clearly.
+
+\fBip-v6-temporary\fR \- (\fBip\fR tool only), scope global temporary. Scope global temporary deprecated is not shown
+
+\fBip-v6-global\fR \- scope global (\fBifconfig\fR will show this for all types, global, global temporary,
+and global temporary deprecated, \fBip\fR shows it only for global)
+
+\fBip-v6-link\fR \- scope link (\fBip\fR/\fBifconfig\fR) \- default for \fB\-i\fR.
+
+\fBip-v6-site\fR \- scope site (\fBip\fR/\fBifconfig\fR). This has been deprecated in IPv6, but still exists.
+\fBifconfig\fR may show multiple site values, as with global temporary, and
+global temporary deprecated.
+
+\fBip-v6-unknown\fR \- unknown scope
+
.TP
.B \-x \-I
\- Show current init system (and init rc in some cases, like OpenRC). With \-xx, shows init/rc
@@ -611,13 +635,15 @@ you would enter a command like this:
If you leave off the \fB\-o\fR, only you will see the output on your local weechat. WeeChat
users may also like to check out the weeget.py
.SH INITIALIZATION FILE
-.TP
inxi will read the following configuration/initialization files in the following order:
-.TP
-.B /etc/inxi.conf
-.TP
-.B $HOME/.inxi/inxi.conf
-.TP
+
+\fB/etc/inxi.conf\fR is the default configurations. These can be overridden by user configurations
+found in one of the following locations (inxi will place its config file using the following precedence
+as well, that is, if \fB$XDG_CONFIG_HOME\fR is not empty, it will go there, else if \fB$HOME/.conf/inxi.conf\fR
+exists, it will go there, and as a last default, the legacy location is used:
+
+\fB$XDG_CONFIG_HOME/inxi.conf\fR or \fB$HOME/.conf/inxi.conf\fR or \fB$HOME/.inxi/inxi.conf\fR
+
See wiki pages for more information on how to set these up:
.TP
.I http://smxi.org/docs/inxi-configuration.htm
@@ -647,16 +673,30 @@ is is a fork of locsmif's largely unmaintained yet very clever, infobash script.
Original infobash author and copyright holder:
Copyright (C) 2005\-2007 Michiel de Boer a.k.a. locsmif
-inxi version: Copyright (C) 2008\-16 Scott Rogers & Harald Hope
+inxi version: Copyright (C) 2008\-16 Harald Hope
+
+Initial CPU logic, konversation version logic, and occasional
+maintenance fixes: Scott Rogers
+
+Further fixes (listed as known):
-Further fixes (listed as known): Horst Tritremmel <hjt at sidux.com>
+Horst Tritremmel <hjt at sidux.com>
Steven Barrett (aka: damentz) \- usb audio patch; swap percent used patch.
+
Jarett.Stevens \- dmidecode \-M patch for older systems with no /sys
And a special thanks to the nice people at irc.oftc.net channels #linux\-smokers\-club and #smxi,
who all really have to be considered to be co\-developers because of their non\-stop enthusiasm
-and willingness to provide real time testing and debugging of inxi development.
+and willingness to provide real time testing and debugging of inxi development.
+
+A further thanks to the Siduction forum members, who have helped get some features
+working by providing a lot of datasets that revealed possible variations, particularly
+for the ram \fB\-m\fR option.
+
+Further thanks to the various inxi package maintainers, distro support people, forum
+moderators, and in particular, sys admins with their particular issues, which almost always
+help make inxi better, and any others who contribute ideas, suggestions, and patches.
Without a wide range of diverse Linux kernel based Free Desktop systems to test on, we could
never have gotten inxi to be as reliable and solid as it's turning out to be.
@@ -664,8 +704,5 @@ never have gotten inxi to be as reliable and solid as it's turning out to be.
And of course, big thanks locsmif, who figured out a lot of the core methods, logic,
and tricks used in inxi.
-Further thanks to the various inxi package maintainers, distro support people, forum
-moderators, and others, who contribute ideas, suggestions, and patches.
-
This Man page was originally created by Gordon Spencer (aka aus9) and is maintained by
Harald Hope (aka h2 or TechAdmin).
diff --git a/inxi.1.gz b/inxi.1.gz
index 900854b..7230acb 100644
--- a/inxi.1.gz
+++ b/inxi.1.gz
Binary files differ
diff --git a/inxi.changelog b/inxi.changelog
index 5483e86..c638198 100644
--- a/inxi.changelog
+++ b/inxi.changelog
@@ -1,4 +1,157 @@
=====================================================================================
+Version: 2.3.11
+Patch Version: 00
+Script Date: 2017-05-31
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball, new man page. This corrects several oversights of the 2.3.10 IPv6 update.
+
+Now there is an -x option for -i that will show the additioanl IPv6 address data for scope global,
+temporary, and site. Also a fallback for unhandled scope: unknown. If the tool 'ip' is used, it will
+filter out the deprecated temp site/global addresses, ifconfig tool does not appear to offer this
+option.
+
+Also changed is that now ipv6 address always shows, it's not an -x option. Probably about time to
+start rolling out ip v6 data to users now that ip v6 is starting, slowly, to be used more.
+
+Another small change, the link address for ipv6 is changed from ip-v6: to ip-v6-link so that it's
+more clear which IP v6 address it is.
+
+The last commit had a significant logic error in it that did not distinguish between the link address,
+which is what should have only shown, and the remaining possible addresses.
+
+I've tried to get a basic bsd support, but it's difficult to know the variants of ifconfig output syntax
+
+-----------------------------------
+-- Harald Hope - Wed, 31 May 2017 14:22:21 -0700
+
+=====================================================================================
+Version: 2.3.10
+Patch Version: 00
+Script Date: 2017-05-31
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. Fixes issue #78 and issue #106
+
+Shows multiple ipv6 addresses, filters out ipv6 temp addresses and ipv6 local addresses.
+
+-----------------------------------
+-- Harald Hope - Wed, 31 May 2017 10:39:00 -0700
+
+=====================================================================================
+Version: 2.3.9
+Patch Version: 00
+Script Date: 2017-05-29
+-----------------------------------
+Changes:
+-----------------------------------
+New version, tarball. Tiny fix, due to a data bug, changing ft to m in weather altitude.
+
+Note that this bug is not universal, but I believe this will make inxi more right than wrong
+as a general rule. Further note that altitude is NOT actually the altitude of the city/location
+requested, in most cases, but rather the altitude of the weather station data assigned to that
+location request.
+
+-----------------------------------
+-- Harald Hope - Mon, 29 May 2017 12:40:12 -0700
+
+=====================================================================================
+Version: 2.3.8
+Patch Version: 00
+Script Date: 2017-01-14
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. Tiny change, added sisimedia video driver to support list.
+
+-----------------------------------
+-- Harald Hope - Sat, 14 Jan 2017 12:47:31 -0800
+
+=====================================================================================
+Version: 2.3.7
+Patch Version: 00
+Script Date: 2016-12-24
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. This fixes an issue where sloppy regex was removing the BIOS
+from BIOSTAR. Also fixed a few other sloppy gsub, and fixed a few gensub errors as well.
+
+Since BIOSTAR is a fairly common mobo, I'm surprised I haven't gotten this bug report
+before.
+
+This closes issue #102.
+
+-----------------------------------
+-- Harald Hope - Sat, 24 Dec 2016 14:53:31 -0800
+
+=====================================================================================
+Version: 2.3.6
+Patch Version: 00
+Script Date: 2016-12-20
+-----------------------------------
+Changes:
+-----------------------------------
+No new version. New tarball, man. Small text changes and cleanup and updates in man page,
+but no actual meaningful changes. Feel free to ignore this one if you just did 2.3.6.
+
+-----------------------------------
+-- Harald Hope - Tue, 20 Dec 2016 19:53:54 -0800
+
+=====================================================================================
+Version: 2.3.6
+Patch Version: 00
+Script Date: 2016-12-19
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. This is a significant change, but inxi should handle it smoothly.
+
+While default configs remain in /etc/inxi.conf, the user overrides now use the following order of tests:
+
+1. XDG_CONFIG_HOME / XDG_DATA_HOME for the config and log/debugger data respectively.
+
+2. Since those will often be blank, it then uses a second priority check:
+ $HOME/.config $HOME/.local/share to place the inxi data directory, which was previously here:
+ $HOME/.inxi
+
+3. If neither of these cases are present, inxi will default to its legacy user data: $HOME/.inxi as before
+
+In order to make this switch transparent to users, inxi will move the files from .inxi to the respective
+.config/ .local/share/inxi directories, and remove the .inxi directory after to cleanup.
+
+Also, since I was fixing some path stuff, I also did issue 77, manual inxi install not putting man pages in
+/usr/local/share/man/man1, which had caused an issue with Arch linux inxi installer. Note that I can't help
+users who had a manual inxi install with their man page in /usr/share/man/man1 already, because it's too risky
+to guess about user or system intentions, this man location correction will only apply if users have never
+installed inxi before manually, and have no distro version installed, unlike the config/data directory,
+which does update neatly with output letting users know the data was moved.
+
+Note that if users have man --path set up incorrectly, it's possible that the legacy man page would show up
+instead, which isn't good, but there was no perfect fix for the man issue so I just picked the easiest way,
+ignoring all man pages installed into /usr/share/man/man1 and treating them as final location, otherwise
+using if present the /usr/local/share/man/man1 location for new manual install users.
+
+Also, for users with existing man locations and an inxi manually installed, you have to update to inxi current,
+then move your man file to /usr/local/share/man/man1, then update man with: mandb command (as root), after that
+inxi will update to the new man location.
+
+Also added some more XDG debugger data as well to cover this for future debugger data.
+
+This closes previous issue #77 (man page for manual inxi install does not go into /usr/local/share/man/man1) and
+issue 101, which I made today just to force the update.
+
+Just as a side note, I find this absurd attempt at 'simplifying by making more complex and convoluted' re the XDG
+and .config and standard nix . file to be sort of tragic, because really, they've just made it all way more complicated,
+and since all 3 methods can be present, all the stuff has to be tested for anyway, so this doesn't make matters cleaner
+at all, it's just pointless busywork that makes some people happy since now there's even more rules to follow, sigh.
+
+-----------------------------------
+-- Harald Hope - Mon, 19 Dec 2016 18:38:57 -0800
+
+=====================================================================================
Version: 2.3.5
Patch Version: 00
Script Date: 2016-12-02