diff --git a/inxi b/inxi index d2007b1..c65bb8f 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/usr/bin/env bash ######################################################################## #### Script Name: inxi -#### Version: 2.2.26 -#### Date: 2015-07-06 +#### Version: 2.2.27 +#### Date: 2015-08-02 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -7351,8 +7351,8 @@ get_networking_usb_data() get_networking_wan_ip_data() { eval $LOGFS - local ip='' ip_data='' downloader_error=0 - + local ip='' ip_data='' downloader_error=0 ua='' + # 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 # to handle ipv4 and ipv6 addresses but should not be necessary. @@ -7361,7 +7361,10 @@ get_networking_wan_ip_data() # ip=$( wget -q -O - $WAN_IP_URL | gawk --re-interval ' case $DOWNLOADER in curl) - ip_data="$( curl -y $DL_TIMEOUT -s $WAN_IP_URL )" || downloader_error=$? + 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=$? @@ -7370,7 +7373,10 @@ get_networking_wan_ip_data() ip_data="$( ftp -o - $WAN_IP_URL 2>/dev/null )" || downloader_error=$? ;; wget) - ip_data="$( wget -T $DL_TIMEOUT -q -O - $WAN_IP_URL )" || downloader_error=$? + 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 diff --git a/inxi.changelog b/inxi.changelog index a371c18..5144feb 100755 --- a/inxi.changelog +++ b/inxi.changelog @@ -1,3 +1,15 @@ +===================================================================================== +Version: 2.2.27 +Patch Version: 00 +Script Date: 2015-08-02 +----------------------------------- +Changes: +----------------------------------- +New version, tarball. Trivial wget/curl change, nothing else. No need to upgrade packages. + +----------------------------------- +-- Harald Hope - Sun, 02 Aug 2015 14:18:45 -0700 + ===================================================================================== Version: 2.2.26 Patch Version: 00