aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2016-03-06 21:51:22 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2016-03-06 21:51:22 -0500
commit8d4e28220ae9e0dea809fe8577a21570dd13ab8b (patch)
tree571474d7b6d2b1959d4e517395fca424a51c6d85
parent6490796ca920f20faca922037ec054c8d7887639 (diff)
parent1904fde82e4912fde22afee0e6e1f23040ce8739 (diff)
downloadinxi-8d4e28220ae9e0dea809fe8577a21570dd13ab8b.tar.bz2
inxi-8d4e28220ae9e0dea809fe8577a21570dd13ab8b.tar.xz
inxi-8d4e28220ae9e0dea809fe8577a21570dd13ab8b.tar.zst
Merge tag 'upstream/2.2.35'
Upstream version 2.2.35 # gpg: Signature made Sun 06 Mar 2016 09:51:19 PM EST using RSA key ID EBE9BD91 # gpg: Good signature from "Unit 193 <unit193@gmail.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.org>" # gpg: aka "Unit 193 <unit193@ubuntu.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.com>"
-rwxr-xr-xinxi90
-rwxr-xr-xinxi.changelog51
2 files changed, 104 insertions, 37 deletions
diff --git a/inxi b/inxi
index 06261e7..c6c237b 100755
--- a/inxi
+++ b/inxi
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
-#### Version: 2.2.33
-#### Date: 2016-01-30
+#### Version: 2.2.35
+#### Date: 2016-02-29
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@@ -494,6 +494,7 @@ DEV_DISK_LABEL=''
DEV_DISK_MAPPER=''
DEV_DISK_UUID=''
DMIDECODE_DATA=''
+DNSTOOL=''
DOWNLOADER='wget'
IRC_CLIENT=''
IRC_CLIENT_VERSION=''
@@ -635,7 +636,7 @@ BAN_LIST_CPU='@||cpu |cpu deca|dual core|dual-core|tri core|tri-core|quad core|q
# this is for bash arrays AND avoiding * in arrays: ( fred * greg ) expands to the contents of the directory
BAN_LIST_ARRAY=',|\*'
-SENSORS_GPU_SEARCH='intel|radeon|nouveau'
+SENSORS_GPU_SEARCH='amdgpu|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.
@@ -842,6 +843,10 @@ initialize_data()
initialize_paths
+ if type -p dig &>/dev/null;then
+ DNSTOOL='dig'
+ fi
+
# set downloaders.
if ! type -p wget &>/dev/null;then
# first check for bsd stuff
@@ -862,8 +867,8 @@ initialize_data()
fi
else
# found a case of battery existing but having nothing in it on desktop mobo
- # not all laptops show the first,
- if [[ -n $( ls /proc/acpi/battery 2>/dev/null ) ]];then
+ # not all laptops show the first. /proc/acpi/battery is deprecated.
+ if [[ -n $( ls /proc/acpi/battery 2>/dev/null ) || -e /sys/class/power_supply/BAT0/ ]];then
B_PORTABLE='true'
fi
fi
@@ -2225,8 +2230,10 @@ check_recommends_items()
xrandr:x11-xserver-utils~xrandr~x11-server-utils~:-G_single_screen_resolution
'
local recommended_apps='
+ dig:dnsutils~dnsutils~bind-utils:-i_first_wlan_ip_default_test
dmidecode:dmidecode~dmidecode~dmidecode~:-M_if_no_sys_machine_data;_-m_memory
file:file~file~file~:-o_unmounted_file_system
+ hciconfig:bluez~bluez-utils~bluez-utils~:-n_-i_bluetooth_data
hddtemp:hddtemp~hddtemp~hddtemp~:-Dx_show_hdd_temp
ifconfig:net-tools~net-tools~net-tools~:-i_ip_lan-deprecated
ip:iproute~iproute2~iproute~:-i_ip_lan
@@ -2767,7 +2774,7 @@ get_parameters()
## debuggers and testing tools
%) B_HANDLE_CORRUPT_DATA='true'
;;
- @) if [[ -n $( grep -E "^([1-9]|1[0-4])$" <<< $OPTARG ) ]];then
+ @) if [[ -n $( grep -E "^([1-9]|1[0-5])$" <<< $OPTARG ) ]];then
DEBUG=$OPTARG
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
B_UPLOAD_DEBUG_DATA='true'
@@ -2981,7 +2988,7 @@ show_options()
# if distro maintainers don't want the weather feature disable it
if [[ $B_ALLOW_WEATHER == 'true' ]];then
print_lines_basic "1" "-w" "Local weather data/time. To check an alternate location, see: -W^<location>. For extra weather data options see -x, -xx, and -xxx."
- print_lines_basic "1" "-W" "<location> Supported options for <location>: postal code; city, state/country; latitude/longitude. Only use if you want the weather somewhere other than the machine running $SCRIPT_NAME. Use only ascii characters, replace spaces in city/state/country names with '+'. Example:^$SCRIPT_NAME^-W^new+york,ny"
+ print_lines_basic "1" "-W" "<location> Supported options for <location>: postal code; city, state/country; latitude, longitude. Only use if you want the weather somewhere other than the machine running $SCRIPT_NAME. Use only ascii characters, replace spaces in city/state/country names with '+'. Example:^$SCRIPT_NAME^-W^new+york,ny"
fi
print_lines_basic "1" "-x" "Adds the following extra data (only works with verbose or line output, not short form):"
print_lines_basic "2" "-C" "CPU Flags, Bogomips on Cpu;"
@@ -5713,7 +5720,7 @@ get_graphics_driver()
eval $LOGFS
# list is from sgfxi plus non-free drivers
- local driver_list='apm|ark|ati|chips|cirrus|cyrix|fbdev|fglrx|glint|i128|i740|intel|i810|imstt|mach64|mga|neomagic|nsc|nvidia|nv|openchrome|nouveau|radeon|radeonhd|rendition|s3virge|s3|savage|siliconmotion|sisusb|sis|tdfx|tga|trident|tseng|unichrome|vboxvideo|vesa|vga|via|voodoo|vmware|v4l'
+ local driver_list='amdgpu|apm|ark|ati|chips|cirrus|cyrix|fbdev|fglrx|glint|i128|i740|intel|i810|imstt|mach64|mga|neomagic|nsc|nvidia|nv|openchrome|nouveau|radeon|radeonhd|rendition|s3virge|s3|savage|siliconmotion|sisusb|sis|tdfx|tga|trident|tseng|unichrome|vboxvideo|vesa|vga|via|voodoo|vmware|v4l'
local driver='' driver_string='' xorg_log_data='' status='' a_temp=''
if [[ $B_XORG_LOG == 'true' ]];then
@@ -7385,7 +7392,7 @@ get_networking_usb_data()
get_networking_wan_ip_data()
{
eval $LOGFS
- local ip='' ip_data='' downloader_error=0 ua=''
+ local ip='' ip_data='' downloader_error=0 ua='' b_ipv4_good=true
# get ip using wget redirect to stdout. This is a clean, text only IP output url,
# single line only, ending in the ip address. May have to modify this in the future
@@ -7393,34 +7400,43 @@ get_networking_wan_ip_data()
# awk has bad regex handling so checking it with grep -E instead
# ip=$( echo 2001:0db8:85a3:0000:0000:8a2e:0370:7334 | gawk --re-interval '
# ip=$( wget -q -O - $WAN_IP_URL | gawk --re-interval '
- case $DOWNLOADER in
- curl)
- if [[ -n $( grep 'smxi.org' <<< $WAN_IP_URL ) ]];then
- ua="-A s-tools/inxi-ip"
- fi
- ip_data="$( curl $ua -y $DL_TIMEOUT -s $WAN_IP_URL )" || downloader_error=$?
- ;;
- fetch)
- ip_data="$( fetch -T $DL_TIMEOUT -q -o - $WAN_IP_URL )" || downloader_error=$?
- ;;
- ftp)
- ip_data="$( ftp -o - $WAN_IP_URL 2>/dev/null )" || downloader_error=$?
- ;;
- wget)
- if [[ -n $( grep 'smxi.org' <<< $WAN_IP_URL ) ]];then
- ua="-U s-tools/inxi-ip"
- fi
- ip_data="$( wget $ua -T $DL_TIMEOUT -q -O - $WAN_IP_URL )" || downloader_error=$?
- ;;
- no-downloader)
- downloader_error=1
- ;;
- esac
- ip=$( gawk --re-interval '
- {
- #gsub("\n","",$2")
- print $NF
- }' <<< "$ip_data" )
+ # this generates a direct dns based ipv4 ip address, but if opendns.com goes down, the fall
+ # note: consistently slower than domain based: dig +short +time=1 +tries=1 myip.opendns.com. A @208.67.222.222
+ # backs will still work.
+ if [[ -n $DNSTOOL ]];then
+ ip=$( dig +short +time=1 +tries=1 myip.opendns.com @resolver1.opendns.com 2>/dev/null)
+ fi
+ if [[ $ip == '' ]];then
+ case $DOWNLOADER in
+ curl)
+ if [[ -n $( grep 'smxi.org' <<< $WAN_IP_URL ) ]];then
+ ua="-A s-tools/inxi-ip"
+ fi
+ ip_data="$( curl $ua -y $DL_TIMEOUT -s $WAN_IP_URL )" || downloader_error=$?
+ ;;
+ fetch)
+ ip_data="$( fetch -T $DL_TIMEOUT -q -o - $WAN_IP_URL )" || downloader_error=$?
+ ;;
+ ftp)
+ ip_data="$( ftp -o - $WAN_IP_URL 2>/dev/null )" || downloader_error=$?
+ ;;
+ wget)
+ if [[ -n $( grep 'smxi.org' <<< $WAN_IP_URL ) ]];then
+ ua="-U s-tools/inxi-ip"
+ fi
+ ip_data="$( wget $ua -T $DL_TIMEOUT -q -O - $WAN_IP_URL )" || downloader_error=$?
+ ;;
+ no-downloader)
+ downloader_error=1
+ ;;
+ esac
+ ip=$( gawk --re-interval '
+ {
+ #gsub("\n","",$2")
+ print $NF
+ }' <<< "$ip_data" )
+ fi
+
# validate the data
if [[ -z $ip ]];then
ip='None Detected!'
diff --git a/inxi.changelog b/inxi.changelog
index b4fece2..1e5be2b 100755
--- a/inxi.changelog
+++ b/inxi.changelog
@@ -1,4 +1,55 @@
=====================================================================================
+Version: 2.2.35
+Patch Version: 00
+Script Date: 2016-02-29
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. A tiny, but meaningful, fix. inxi had not been updated to
+test for the non deprecated battery test, /sys/class/power_supply/BAT0 existence.
+
+This resulted in failure to indicate 'portable' where applicable.
+
+I may also now add battery information where applicable since that's easy to get from
+/sys
+
+-----------------------------------
+-- Harald Hope - Mon, 29 Feb 2016 12:21:09 -0800
+
+=====================================================================================
+Version: 2.2.34
+Patch Version: 00
+Script Date: 2016-02-21
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. This closes two issues:
+
+1. Add amdgpu to possible xorg drivers list (and gpu sensors data)
+
+2. switch to default dig command to get WAN ip. This is usually but not always faster than
+the http method. Because the IP source is not truly trustworthy (run by cisco), I'm keeping a
+fallback mode on 1 second time out failure of the previous http based methods. Added dig
+to recommended tools list.
+
+-----------------------------------
+-- Harald Hope - Sun, 21 Feb 2016 11:18:54 -0800
+
+=====================================================================================
+Version: 2.2.33
+Patch Version: 00
+Script Date: 2016-01-30
+-----------------------------------
+Changes:
+-----------------------------------
+No version change, new tarball. Someone spotted a small glitch in -W help menu.
+
+Says latitude/longtitude instead of latitude,longtitude
+
+-----------------------------------
+-- Harald Hope - Tue, 09 Feb 2016 11:20:03 -0800
+
+=====================================================================================
Version: 2.2.33
Patch Version: 00
Script Date: 2016-01-30