From c9cc6ccb52c29a25b7c54be9a5aaf01c85527e5b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 14 Dec 2014 12:39:02 +0000 Subject: [PATCH] Second try --- install-freedombone.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install-freedombone.sh b/install-freedombone.sh index 26a0521a..573d1070 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -925,6 +925,10 @@ function create_restore_script { echo ' echo "Restore the MariaDB user table"' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' mysqlsuccess=$(mysql -u root --password=$DATABASE_PASSWORD mysql -o < /root/tempmariadb/usb/backup/mariadb/tempmariadb/mysql.sql)' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' if [ ! "$?" = "0" ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' echo "Try again using the password obtained from backup"' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' mysqlsuccess=$(mysql -u root --password=$BACKUP_MARIADB_PASSWORD mysql -o < /root/tempmariadb/usb/backup/mariadb/tempmariadb/mysql.sql)' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo ' if [ ! "$?" = "0" ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME echo ' echo "$mysqlsuccess"' >> /usr/bin/$RESTORE_SCRIPT_NAME echo " umount $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME echo " rm -rf $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME