summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/install_proxy.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-05-14 17:43:24 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-05-14 17:43:24 (GMT)
commitff1c4b05fb75ba9372176b0237bf69cc76498412 (patch)
treea3ebdfd926ae83b38bacb26673914f82a9c42143 /abs/core/LinHES-config/install_proxy.sh
parentc4a0f6ade8a4b2052acfcfc306c4585082233548 (diff)
downloadlinhes_pkgbuild-ff1c4b05fb75ba9372176b0237bf69cc76498412.zip
linhes_pkgbuild-ff1c4b05fb75ba9372176b0237bf69cc76498412.tar.gz
linhes_pkgbuild-ff1c4b05fb75ba9372176b0237bf69cc76498412.tar.bz2
LinHES-config: install_proxy.sh more debugging for network check, also fix hostname test that always returned true
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 ]