summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config-svn/restore_km_db_chroot.sh
diff options
context:
space:
mode:
authorMichael Hanson <mihanson@linhes.org>2011-11-04 19:21:13 (GMT)
committerMichael Hanson <mihanson@linhes.org>2011-11-04 19:21:13 (GMT)
commit94f21428c8ed60129ee5e14b1914a8cfe1bcdb2a (patch)
tree27c63c2fa679256dbc46bbff241c41db98e9d244 /abs/core/LinHES-config-svn/restore_km_db_chroot.sh
parente3a0f9ba95aa059d76a57c7821a5ccc6a80a5f84 (diff)
parent67989fe1be117ac23fa3a98acbc2794a17d7d0ed (diff)
downloadlinhes_pkgbuild-94f21428c8ed60129ee5e14b1914a8cfe1bcdb2a.zip
linhes_pkgbuild-94f21428c8ed60129ee5e14b1914a8cfe1bcdb2a.tar.gz
linhes_pkgbuild-94f21428c8ed60129ee5e14b1914a8cfe1bcdb2a.tar.bz2
Merge branch 'testing' of knoppmyth.net:linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/LinHES-config-svn/restore_km_db_chroot.sh')
-rw-r--r--abs/core/LinHES-config-svn/restore_km_db_chroot.sh61
1 files changed, 0 insertions, 61 deletions
diff --git a/abs/core/LinHES-config-svn/restore_km_db_chroot.sh b/abs/core/LinHES-config-svn/restore_km_db_chroot.sh
deleted file mode 100644
index e72e8c2..0000000
--- a/abs/core/LinHES-config-svn/restore_km_db_chroot.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-. /etc/profile
-. /etc/systemconfig
-. $MV_ROOT/bin/install_functions.sh
-
-myhost=$hostname
-hostname $myhost
-mount -t proc none /proc
-DBFILE=$1
-
-if [ $SystemType = "Master_backend" -o $SystemType = "Standalone" ]
- then
- #restore database
- pacman --noconfirm -Sf mysql
- status=1
- mysqlstatus=1
- while [ ! $status = 0 ]
- do
- /etc/rc.d/mysqld stop
- sleep 1
- /etc/rc.d/mysqld start
- mysqlstatus=$?
- if [ $mysqlstatus = 0 ]
- then
- mysql -e "show databases;"
- showstatus=$?
- if [ $showstatus = 0 ]
- then
- #load database
- pacman --noconfirm -R mythdb-initial
- pacman --noconfirm -S mythdb-initial
-
- if [ -f $DBFILE ]
- then
- echo "restoring old database"
- gunzip -c $DBFILE > /tmp/mythconverg.sql
- mysql mythconverg < /tmp/mythconverg.sql
- update_db_settings HostServiceMythWEB "1"
- echo 'UseMythWEB="1"' >> /etc/systemconfig
- else
- echo "Could not restore old database, mythconverg.sql is missing."
- touch /tmp/.upgrade_db_failed
- fi
-
- if [ -d /data/srv/mysql/mythconverg ]
- then
- status=0
- fi
- fi
- fi
- done
- rm -f /tmp/mythconverg.sql
- else
- exit 0
- fi
-
-#/etc/rc.d/mysqld stop
-#umount /proc
-
-
-