summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-01-15 00:55:32 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-01-15 00:55:32 (GMT)
commitfb1297d921cc57b9cb3b02ec6c279795190429be (patch)
tree3da074dcdd229d243dc13fb78ba0b004e88ec10b /abs/core-testing
parent803e1b7ed812e160aae7c9f64a1d656d1d7b3c8a (diff)
downloadlinhes_pkgbuild-fb1297d921cc57b9cb3b02ec6c279795190429be.zip
linhes_pkgbuild-fb1297d921cc57b9cb3b02ec6c279795190429be.tar.gz
linhes_pkgbuild-fb1297d921cc57b9cb3b02ec6c279795190429be.tar.bz2
add support for /myth not mounted on sda3 for upgrades.
Includes software raid support. fix invalid temp table names based off hostname.
Diffstat (limited to 'abs/core-testing')
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rwxr-xr-xabs/core-testing/LinHES-config/install_proxy.sh49
-rwxr-xr-xabs/core-testing/LinHES-config/restore_default_settings.sh4
3 files changed, 45 insertions, 10 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 76754da..8676d36 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=178
+pkgrel=185
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_proxy.sh b/abs/core-testing/LinHES-config/install_proxy.sh
index 175d7f9..b910ec4 100755
--- a/abs/core-testing/LinHES-config/install_proxy.sh
+++ b/abs/core-testing/LinHES-config/install_proxy.sh
@@ -90,20 +90,55 @@ function backup_sql_check {
return $rc
}
+function mdadm_assemble_all {
+
+ mdadm_find /tmp
+ mdadm --assemble --scan -c /tmp${MDADM_CONF}
+ MDLIST=`grep ARRAY /tmp${MDADM_CONF}|tr -s [:space:]|cut -d" " -f2`
+ for array in $MDLIST
+ do
+ echo "assembling array $array"
+ mdadm --assemble -c /tmp${MDADM_CONF} $array
+ sleep 2
+ fsck -p $array
+ done
+
+}
+
function upgrade_mount_search {
MYTH_P=`cat /tmp/etc/fstab |grep -E /myth[[:space:]] | awk ' {print $1 '} `
umount $mountpoint/myth
+
+ #should probably just mdadm all the time
echo $MYTH_P |grep -q \/md.
if [ $? = 0 ]
then
- mdadm_find /tmp
- mdadm --assemble -c /tmp${MDADM_CONF} $MYTH_P
- sleep 2
- fsck -p $MYTH_P
+ mdadm_assemble_all
+ fi
+
+ echo $MYTH_P |grep -q UUID
+ if [ $? = 0 ]
+ then
+ MUUID=`echo $MYTH_P|cut -d= -f2|tr -d \"`
+ echo blkid $MUUID
+ blkid -t UUID=$MUUID
+ if [ ! $? = 0 ]
+ then
+ echo "couldn't find $MUUID, starting md support"
+ mdadm_assemble_all
+ fi
+ mount -U $MUUID $mountpoint/myth
+ echo mount -U $MUUID $mountpoint/myth
+ MYTHMOUNT=`blkid -t UUID=$MUUID|cut -d: -f1`
+ MYTHMOUNT=`basename $MYTHMOUNT`
+ echo "MYTHMOUNT is $MYTHMOUNT"
+ else
+ mount $MYTH_P $mountpoint/myth
+ echo mount $MYTH_P $mountpoint/myth
+ MYTHMOUNT=`basename $MYTH_P`
+ echo "MYTHMOUNT is $MYTHMOUNT"
fi
- mount $MYTH_P $mountpoint/myth
- echo mount $MYTH_P $mountpoint/myth
sleep 2
backup_sql_check
if [ $? = 1 ]
@@ -117,8 +152,6 @@ function upgrade_mount_search {
BACKUPFILE="/root/backup/mythconverg.sql.gz"
echo "setting BACKUPFILE to $BACKUPFILE"
fi
- else
- MYTHMOUNT=`basename $MYTH_P`
fi
return 0
}
diff --git a/abs/core-testing/LinHES-config/restore_default_settings.sh b/abs/core-testing/LinHES-config/restore_default_settings.sh
index 46c5fc9..5a02886 100755
--- a/abs/core-testing/LinHES-config/restore_default_settings.sh
+++ b/abs/core-testing/LinHES-config/restore_default_settings.sh
@@ -29,7 +29,9 @@ function CMD_DEFINE () {
}
function SQL_DEFINE () {
- thostname=`echo ${hostname}|tr - _`
+ thostname=`echo ${hostname}|tr -C [:alpha:] _`
+ echo "Using $thostname for temp table postfix"
+
#$1 is the table name
if [ $1 = "settings" ]
then