From 2b14b52d8f726dac0ecc61d8910c0b10439be065 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 30 Sep 2015 11:31:10 +0200 Subject: [system-restore] Only restore dozmod config from old configuration if told to do so --- scripts/system-restore | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/system-restore b/scripts/system-restore index b9fe9d0..21e7d05 100755 --- a/scripts/system-restore +++ b/scripts/system-restore @@ -85,8 +85,12 @@ if [ $DB_OLD -eq 1 ]; then # Restoring from dozmod v1.0 db mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 < db.sql RET=$? - echo "--- Trying to convert dozmod data (this might not work too well...)" - mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 < "${TMDIR}/data/dozmod-upgrade.sql" + if [ $RES_SAT -eq 1 ]; then + echo "--- Trying to convert dozmod data (this might not work too well...)" + mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 < "${TMDIR}/data/dozmod-upgrade.sql" + else + echo "DROP DATABASE bwLehrpool" | mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 + fi else # Restoring from v1.1+ db RET=0 -- cgit v1.2.3-55-g7522