summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-01-15 02:29:10 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-01-15 02:29:10 (GMT)
commit3e16300236c102f1d7752f67728a322cdf3ec853 (patch)
tree3b7f1130d9870485d4b7aa85dd31c0b34e53d029 /abs/core-testing
parent32d88ea8ca1302f37d78ec5881717188f2631bea (diff)
downloadlinhes_pkgbuild-3e16300236c102f1d7752f67728a322cdf3ec853.zip
linhes_pkgbuild-3e16300236c102f1d7752f67728a322cdf3ec853.tar.gz
linhes_pkgbuild-3e16300236c102f1d7752f67728a322cdf3ec853.tar.bz2
Revised logic for hostname check.
Fix /myth UUID for installs.
Diffstat (limited to 'abs/core-testing')
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rwxr-xr-xabs/core-testing/LinHES-config/install_functions.sh7
-rwxr-xr-xabs/core-testing/LinHES-config/install_proxy.sh29
3 files changed, 22 insertions, 16 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 8676d36..c25ee7e 100755
--- 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=185
+pkgrel=191
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 )
diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh
index b412663..fd84d6c 100755
--- a/abs/core-testing/LinHES-config/install_functions.sh
+++ b/abs/core-testing/LinHES-config/install_functions.sh
@@ -446,10 +446,17 @@ case $1 in
FOUNDUUID=""
if [ x$4 = x ]
then
+ #upgrade
+ find_uuid ${2}3
+ elif [ x$5 = xFULL_INSTALL ]
+ then
+ #install
find_uuid ${2}3
else
+ #upgrade with non statndard myth
find_uuid $4
fi
+
DATAUUID=$FOUNDUUID
diff --git a/abs/core-testing/LinHES-config/install_proxy.sh b/abs/core-testing/LinHES-config/install_proxy.sh
index b910ec4..011dfac 100755
--- a/abs/core-testing/LinHES-config/install_proxy.sh
+++ b/abs/core-testing/LinHES-config/install_proxy.sh
@@ -581,11 +581,11 @@ echo "-----------------------------------------------------------------------3--
echo "network check myself"
ifconfig
ping -c 1 $myipdefault
- if [ ! $? = 0 ]
- then
- exit 3
- #can't ping yourself
- fi
+ if [ ! $? = 0 ]
+ then
+ exit 3
+ #can't ping yourself
+ fi
;;
check_gw)
#check gateway
@@ -623,7 +623,7 @@ echo "-----------------------------------------------------------------------3--
;;
host_names)
#if host is found, then check to see if it's online
- #if not online, assume it's ok to use this hostname
+ #if hoip matchs my ip assume it's ok
echo "network check my hostname $hostname"
hout=`host $hostname`
status=$?
@@ -631,21 +631,20 @@ echo "-----------------------------------------------------------------------3--
if [ $status = 0 ]
then
hoip=`echo $hout|awk '{print $4}'`
- ping -c 1 $hoip
+ /sbin/ifconfig -a |grep -q $hoip
if [ $? = 0 ]
then
+ echo "DNS ip matches on of my ips"
status=0
else
- status=1
+ echo "IP in DNS but doesn't match mine, hostname is not safe to use"
+ status=7
fi
+ else
+ echo "Couldn't find hostname in DNS, must be safe to use"
+ status=0
fi
-
- if [ $status = 0 ]
- then
- exit 7
- fi
-
-
+ exit $status
;;
esac