diff --git a/home.admin/00infoLCD.sh b/home.admin/00infoLCD.sh index 9b11e08..1ca327a 100755 --- a/home.admin/00infoLCD.sh +++ b/home.admin/00infoLCD.sh @@ -173,6 +173,16 @@ while : continue fi + if [ "${state}" = "reboot" ]; then + l1="Reboot needed.\n" + l2="ssh admin@${localip}\n" + l3="Use password: PasswordA\n" + boxwidth=$((${#localip} + 28)) + dialog --backtitle "RaspiBlitz ${codeVersion} (${state}) ${setupStep} ${localip}" --infobox "$l1$l2$l3" 5 ${boxwidth} + sleep 3 + continue + fi + if [ "${state}" = "retorrent" ]; then l1="Repair Mode- TORRENT\n" l2="ssh admin@${localip}\n" diff --git a/home.admin/40addHDD.sh b/home.admin/40addHDD.sh index 4734227..e1c1f01 100755 --- a/home.admin/40addHDD.sh +++ b/home.admin/40addHDD.sh @@ -113,9 +113,25 @@ if [ ${existsHDD} -gt 0 ]; then echo "OK HDD got added ... returning to provisioning" exit 1 else - # when normal setup - echo "Continuing with finishing the system setup ..." - ./60finishHDD.sh + + # ask user if prepared blockchain is to use or self-validate + whiptail --title ' Use Blockchain from HDD/SSD? ' --yes-button='Continue' --no-button='DELETE' --yesno " +On the HDD/SSD Blockchain data was found.\n +Continue if you trust that data to be valid.\n +If you dont trust that data you can now choose to delete it - but keep in mind that this can add multiple days of waiting time to your setup process to regain or self-validate the initial blockchain data. + " 14 75 + if [ $? -eq 1 ]; then + # DELETE + sudo rm -R /mnt/hdd/bitcoin 2>/dev/null + sudo rm -R /mnt/hdd/litecoin 2>/dev/null + # HDD is now empty - let setupBlitz - display next options + ./10setupBlitz.sh + else + # CONTINUE + echo "Continuing with finishing the system setup ..." + ./60finishHDD.sh + fi + fi else diff --git a/home.admin/95finalSetup.sh b/home.admin/95finalSetup.sh index 31db77a..516d07d 100755 --- a/home.admin/95finalSetup.sh +++ b/home.admin/95finalSetup.sh @@ -11,6 +11,7 @@ source /mnt/hdd/raspiblitz.conf 2>/dev/null source /home/admin/_version.info # show info to user +sudo sed -i "s/^state=.*/state=reboot/g" /home/admin/raspiblitz.info dialog --backtitle "RaspiBlitz - Setup" --title " RaspiBlitz Setup is done :) " --msgbox " After reboot RaspiBlitz needs to be unlocked and