浏览代码

Second try

Bob Mottram 10 年前
父节点
当前提交
c9cc6ccb52
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      install-freedombone.sh

+ 4
- 0
install-freedombone.sh 查看文件

@@ -925,6 +925,10 @@ function create_restore_script {
925 925
       echo '    echo "Restore the MariaDB user table"' >> /usr/bin/$RESTORE_SCRIPT_NAME
926 926
       echo '    mysqlsuccess=$(mysql -u root --password=$DATABASE_PASSWORD mysql -o < /root/tempmariadb/usb/backup/mariadb/tempmariadb/mysql.sql)' >> /usr/bin/$RESTORE_SCRIPT_NAME
927 927
       echo '    if [ ! "$?" = "0" ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
928
+      echo '      echo "Try again using the password obtained from backup"' >> /usr/bin/$RESTORE_SCRIPT_NAME
929
+      echo '      mysqlsuccess=$(mysql -u root --password=$BACKUP_MARIADB_PASSWORD mysql -o < /root/tempmariadb/usb/backup/mariadb/tempmariadb/mysql.sql)' >> /usr/bin/$RESTORE_SCRIPT_NAME
930
+      echo '    fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
931
+      echo '    if [ ! "$?" = "0" ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
928 932
       echo '      echo "$mysqlsuccess"' >> /usr/bin/$RESTORE_SCRIPT_NAME
929 933
       echo "      umount $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
930 934
       echo "      rm -rf $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME