diff options
author | Douglas R Colkitt <douglas.colkitt@gmail.com> | 2019-04-13 18:48:24 +0300 |
---|---|---|
committer | Douglas R Colkitt <douglas.colkitt@gmail.com> | 2019-04-13 18:48:24 +0300 |
commit | 0416c2b7eada21a61a8be54e5a17bf09da878ada (patch) | |
tree | d6b28c01008eba7e08024825485c90fa4e6f4ce0 | |
parent | 98e9326534adcf8e20b67d0c979deef621736fff (diff) |
Fix issue with POSIX portability in proxyresolv script
-rwxr-xr-x | src/proxyresolv | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/proxyresolv b/src/proxyresolv index eccf882..e1674b4 100755 --- a/src/proxyresolv +++ b/src/proxyresolv @@ -3,13 +3,12 @@ # DNS server used to resolve names -if [[ -z "$PROXY_DNS_SERVER" ]] ; then +if [ -z "$PROXY_DNS_SERVER" ] ; then DNS_SERVER=208.67.222.222 # OpenDNS else DNS_SERVER=$PROXY_DNS_SERVER fi - if [ $# = 0 ] ; then echo " usage:" echo " proxyresolv <hostname> " @@ -17,7 +16,7 @@ if [ $# = 0 ] ; then fi awk 'BEGIN{ARGC=0} {for(i=2;i<=NF;i++){if($i==ARGV[1] && $1!~":"){print $1;found=1}} } END{exit found?0:1}' "$1" </etc/hosts -if [[ "$?" -eq "0" ]]; then +if [ "$?" -eq "0" ]; then exit fi |