added more browsers to ip test

This commit is contained in:
inxi-svn 2008-11-21 19:51:00 +00:00
parent ff58282b96
commit e853fed8ff

21
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 0.6.0-b1-t8 #### version: 0.6.0-b1-t9
#### Date: November 20 2008 #### Date: November 20 2008
######################################################################## ########################################################################
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif #### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
@ -1789,17 +1789,20 @@ get_networking_data()
get_networking_wan_ip_data() get_networking_wan_ip_data()
{ {
local extras_data='' ip='' browser='' local extras_data='' ip='' use_browser='' browser=''
local browsers='elinks links links2 lynx w3m'
# first find a client to use: # first find a browser to use, these all support -dump
if [[ -n $( which lynx ) ]];then for browser in $browsers
browser='lynx' do
elif [[ -n $( which links2 ) ]];then if [[ -n $( which $browser ) ]];then
browser='links2' use_browser=$browser
break
fi fi
done
if [[ -n $browser ]];then if [[ -n $use_browser ]];then
ip=$( $browser -dump techpatterns.com/ip | awk -F 'is: ' '{ ip=$( $use_browser -dump techpatterns.com/ip | awk -F 'is: ' '{
#gsub("\n","",$2") #gsub("\n","",$2")
print $2 print $2
}' ) }' )