summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config
diff options
context:
space:
mode:
authorNathan Harris <nharris@eoimaging.com>2009-03-23 20:50:05 (GMT)
committerNathan Harris <nharris@eoimaging.com>2009-03-23 20:50:05 (GMT)
commit13b856fdb77668c88cbbc13301030a92da8e4ccc (patch)
treefab2b5b50d1bd09a3e63654930534871e938ee5b /abs/core-testing/LinHES-config
parent861026de0146bbefe9b3329ca5c75973dfc9bec2 (diff)
parent88ea3bd15743e5ded7ac8f409b31c07f545b39ea (diff)
downloadlinhes_pkgbuild-13b856fdb77668c88cbbc13301030a92da8e4ccc.zip
linhes_pkgbuild-13b856fdb77668c88cbbc13301030a92da8e4ccc.tar.gz
linhes_pkgbuild-13b856fdb77668c88cbbc13301030a92da8e4ccc.tar.bz2
Merge branch 'master' of nharris@knoppmyth.net:LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/LinHES-config')
-rw-r--r--abs/core-testing/LinHES-config/PKGBUILD2
-rwxr-xr-xabs/core-testing/LinHES-config/install_proxy.sh29
2 files changed, 26 insertions, 5 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index ef2fa4d..cabc674 100644
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=1.0
-pkgrel=343
+pkgrel=344
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
pkgdesc="Install and configure your system"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan system-templates )
diff --git a/abs/core-testing/LinHES-config/install_proxy.sh b/abs/core-testing/LinHES-config/install_proxy.sh
index 824c76e..c73b860 100755
--- a/abs/core-testing/LinHES-config/install_proxy.sh
+++ b/abs/core-testing/LinHES-config/install_proxy.sh
@@ -647,8 +647,17 @@ echo "-----------------------------------------------------------------------3--
#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`
+ hout=`host $hostname|head -n1`
status=$?
+ hoip=`echo $hout|awk '{print $4}'`
+ if [ $hoip = found: ]
+ then
+ status=1
+ fi
+
+ unkownhost=`host unkown.linhes.org |head -n1 `
+ unkownhostip=`echo $unkownhost |awk '{print $4}'`
+
#found host, now grab the ip
if [ $status = 0 ]
then
@@ -656,11 +665,23 @@ echo "-----------------------------------------------------------------------3--
/sbin/ifconfig -a |grep -q $hoip
if [ $? = 0 ]
then
- echo "DNS ip matches on of my ips"
+ echo "DNS ip matches on of my ips $hoip"
status=0
else
- echo "IP in DNS but doesn't match mine, hostname is not safe to use"
- status=7
+ if [ $unkownhostip = $hoip ]
+ then
+ echo "Bad DNS returning false hits"
+ echo "Assuming hostname is OK"
+ echo "DNS unknown: $unkownhostip"
+ echo " HOSTDNS: $hoip "
+ /sbin/ifconfig -a |grep "inet addr"
+ else
+ echo "IP in DNS but doesn't match mine, hostname is not safe to use"
+ echo "DNS:$hoip"
+ echo "HOST: "
+ /sbin/ifconfig -a |grep "inet addr"
+ status=7
+ fi
fi
else
echo "Couldn't find hostname in DNS, must be safe to use"