summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2009-08-01 23:57:05 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2009-08-01 23:57:05 (GMT)
commit657aa7b8d352108a98719a22e6422b490e598d26 (patch)
treeb2259685fe6409f86d814a1703068ce0fcf0ace8 /abs/core-testing/LinHES-config
parent3f300e50406f82e3fde4f48dd7c14fa79cbcd99a (diff)
parent61344e5f8def4236eadfb43c1efd30bc65c21394 (diff)
downloadlinhes_pkgbuild-657aa7b8d352108a98719a22e6422b490e598d26.zip
linhes_pkgbuild-657aa7b8d352108a98719a22e6422b490e598d26.tar.gz
linhes_pkgbuild-657aa7b8d352108a98719a22e6422b490e598d26.tar.bz2
Merge branch 'master' of ssh://gregfrost@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/LinHES-config')
-rwxr-xr-xabs/core-testing/LinHES-config/install_functions.sh35
-rwxr-xr-xabs/core-testing/LinHES-config/mv_config.py2
2 files changed, 31 insertions, 6 deletions
diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh
index 29f57cc..0bc0591 100755
--- a/abs/core-testing/LinHES-config/install_functions.sh
+++ b/abs/core-testing/LinHES-config/install_functions.sh
@@ -200,6 +200,15 @@ function rest_of_network () {
else
printhl " DNS not found"
fi
+ echo $CMDLINE | grep -q chostname
+ if [ $? -eq 0 ]
+ then
+ TEMPVAR=${CMDLINE#*chostname=}
+ MYHOST=${TEMPVAR%% *}
+ update_db_settings HostMyhostname "$MYHOST"
+ else
+ printhl " hostname not found"
+ fi
}
function init_network {
@@ -259,6 +268,14 @@ function dev_up_check(){
}
function request_dhcp(){
+ echo $CMDLINE |grep -q cnetdev
+ if [ $? -eq 0 ]
+ then
+ TEMPVAR=${CMDLINE#*cnetdev=}
+ MYTHDEFAULT_NET=${TEMPVAR%% *}
+ else
+ MYTHDEFAULT_NET="eth0"
+ fi
for ndev in eth0 eth1 wlan0 wlan1 ath0
do
dev_up_check $ndev
@@ -266,22 +283,30 @@ function request_dhcp(){
if [ $status -eq 1 ]
then
#interface is down, lets see if dhcp responds
- dhcpcd -Td -t2 $ndev > /tmp/dhcpinfo.$ndev
- TEMPVAR=`grep IPADDR /tmp/dhcpinfo.$ndev |cut -d\' -f2`
+ dhcpcd -Td -t2 $ndev -h "" > /tmp/dhcpinfo.$ndev
+ #check for hostname here
+
+ TEMPVAR=`grep new_ip_address /tmp/dhcpinfo.$ndev |cut -d\= -f2`
if [ ! x$TEMPVAR = x ]
then
update_db_settings HostIP$ndev "$TEMPVAR"
- TEMPVAR=`grep NETMASK /tmp/dhcpinfo.$ndev |cut -d\' -f2`
+ TEMPVAR=`grep new_subnet_mask /tmp/dhcpinfo.$ndev |cut -d\= -f2`
nm=`/usr/bin/nmconv.py -obits $TEMPVAR`
TEMPVAR="/$nm $TEMPVAR"
update_db_settings HostNETMASK$ndev "$TEMPVAR"
- TEMPVAR=`grep GATEWAYS /tmp/dhcpinfo.$ndev |cut -d\' -f2`
+ TEMPVAR=`grep new_routers /tmp/dhcpinfo.$ndev |cut -d\= -f2`
update_db_settings HostGW$ndev "$TEMPVAR"
- TEMPVAR=`grep DNSSERVERS /tmp/dhcpinfo.$ndev |cut -d\' -f2`
+ TEMPVAR=`grep new_domain_name_servers /tmp/dhcpinfo.$ndev |cut -d\= -f2`
update_db_settings HostDNS$ndev "$TEMPVAR"
fi
fi
done
+ TEMPVAR=`grep new_host_name /tmp/dhcpinfo.$MYTHDEFAULT_NET |cut -d\= -f2`
+ if [ ! x$TEMPVAR = x ]
+ then
+ update_db_settings HostMyhostname "$TEMPVAR"
+ fi
+
}
function init_remote {
diff --git a/abs/core-testing/LinHES-config/mv_config.py b/abs/core-testing/LinHES-config/mv_config.py
index d5a247d..1ac4fea 100755
--- a/abs/core-testing/LinHES-config/mv_config.py
+++ b/abs/core-testing/LinHES-config/mv_config.py
@@ -10,7 +10,7 @@ NOOPDEBUG="FALSE"
BACKUPFILE="mythconverg.sql.gz"
BACKUPPATH="/myth/backup/"
TEMP_TEMPLATES="/tmp/templates"
-SMEDIA="/myth"
+SMEDIA="myth"