From 438092055547037abd985ddec83cfe06551e62a6 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Mon, 26 Jan 2009 15:04:08 -0600 Subject: Stop mysql from being installed on a FE only upgrade. --- abs/core-testing/LinHES-config/PKGBUILD | 2 +- abs/core-testing/LinHES-config/install_proxy.sh | 54 +++++++++++++------------ 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index 28a67f0..1341ab2 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=224 +pkgrel=225 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 2dd8666..75ca6f0 100755 --- a/abs/core-testing/LinHES-config/install_proxy.sh +++ b/abs/core-testing/LinHES-config/install_proxy.sh @@ -396,42 +396,44 @@ function upgrade () { #wrap this in a network check_network, no need to update the db if the import worked. ##### do I need to start mysql? /etc/rc.d/mysqld stop - echo $CMDLINE | grep -q clean_upgrade - status=$? - if [ $status = 0 ] + if [ $SystemType = "Master_backend" -o $SystemType = "Standalone" ] then - #new db as part of clean upgrade - echo "--------------------------------" - echo "clean upgrade installing new database" - echo "--------------------------------" - chroot "$mountpoint" "$MV_ROOT/bin/install_db_chroot.sh" |tee /tmp/chrootdb.out - echo "############################################" - echo "End Installing new database/clean" - echo "############################################" - else - #proceed as normal - if [ -f "$mountpoint"/$BACKUPFILE ] + echo $CMDLINE | grep -q clean_upgrade + status=$? + if [ $status = 0 ] then + #new db as part of clean upgrade echo "--------------------------------" - echo "Restoring database with $BACKUPFILE" + echo "clean upgrade installing new database" echo "--------------------------------" - chroot "$mountpoint" "$MV_ROOT/bin/restore_km_db_chroot.sh" "$BACKUPFILE" |tee /tmp/chrootdb_km.out + chroot "$mountpoint" "$MV_ROOT/bin/install_db_chroot.sh" |tee /tmp/chrootdb.out echo "############################################" - echo "End Restoring database" + echo "End Installing new database/clean" echo "############################################" else - echo "--------------------------------" - echo "Couldn't find backup file, installing new database" - echo "--------------------------------" - touch /tmp/.upgrade_db_failed - chroot "$mountpoint" "$MV_ROOT/bin/install_db_chroot.sh" |tee /tmp/chrootdb.out - echo "############################################" - echo "End Installing new database" - echo "############################################" + #proceed as normal + if [ -f "$mountpoint"/$BACKUPFILE ] + then + echo "--------------------------------" + echo "Restoring database with $BACKUPFILE" + echo "--------------------------------" + chroot "$mountpoint" "$MV_ROOT/bin/restore_km_db_chroot.sh" "$BACKUPFILE" |tee /tmp/chrootdb_km.out + echo "############################################" + echo "End Restoring database" + echo "############################################" + else + echo "--------------------------------" + echo "Couldn't find backup file, installing new database" + echo "--------------------------------" + touch /tmp/.upgrade_db_failed + chroot "$mountpoint" "$MV_ROOT/bin/install_db_chroot.sh" |tee /tmp/chrootdb.out + echo "############################################" + echo "End Installing new database" + echo "############################################" + fi fi fi - if [ -f /tmp/etc/KnoppMyth-version ] then chroot "$mountpoint" $MV_ROOT/bin/restore_default_settings.sh -c restore -t hostsettings -- cgit v0.12