summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/install_proxy.sh
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2012-05-16 16:18:34 (GMT)
committerBritney Fransen <brfransen@gmail.com>2012-05-16 16:18:34 (GMT)
commit71cfd1ae3aeeb1989869a0d8e948340602ef1c8e (patch)
treed92ecb2affdae51e0c3dde00eb656c8a5db0e62e /abs/core/LinHES-config/install_proxy.sh
parentfeb3eb587bc14cc4415aecdbe0d39feb86e0bb9d (diff)
parentd11edcfd208c6ee48819b565c9dbd620e9c83781 (diff)
downloadlinhes_pkgbuild-71cfd1ae3aeeb1989869a0d8e948340602ef1c8e.zip
linhes_pkgbuild-71cfd1ae3aeeb1989869a0d8e948340602ef1c8e.tar.gz
linhes_pkgbuild-71cfd1ae3aeeb1989869a0d8e948340602ef1c8e.tar.bz2
Merge branch 'testing' of linhes.org:linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/LinHES-config/install_proxy.sh')
-rwxr-xr-xabs/core/LinHES-config/install_proxy.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/abs/core/LinHES-config/install_proxy.sh b/abs/core/LinHES-config/install_proxy.sh
index 2449874..c2a450d 100755
--- a/abs/core/LinHES-config/install_proxy.sh
+++ b/abs/core/LinHES-config/install_proxy.sh
@@ -137,14 +137,18 @@ case $1 in
#if host is found, then check to see if it's online
#if hoip matchs my ip assume it's ok
echo "network check my hostname $hostname"
- hout=`host $hostname|head -n1`
+ echo "Check of hostname with host: $hout"
+ host $hostname
status=$?
+
+ hout=`host $hostname|head -n1`
hoip=`echo $hout|awk '{print $4}'`
if [ $hoip = found: ]
then
status=1
fi
+
if [ $hoip = "out;" ]
then
#;; connection timed out; no servers could be reached
@@ -152,8 +156,11 @@ case $1 in
status=1
fi
- unkownhost=`host unkown.linhes.org |head -n1 `
- unkownhostip=`echo $unkownhost |awk '{print $4}'`
+ if [ $status = 0 ]
+ then
+ unkownhost=`host unkown.linhes.org |head -n1 `
+ unkownhostip=`echo $unkownhost |awk '{print $4}'`
+ fi
#found host, now grab the ip
if [ $status = 0 ]