Browse Source

#712 ask if prepared blockchain should get deleted

v1.3
Christian Rotzoll 6 years ago
parent
commit
12d6d2f88c
  1. 10
      home.admin/00infoLCD.sh
  2. 18
      home.admin/40addHDD.sh
  3. 1
      home.admin/95finalSetup.sh

10
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"

18
home.admin/40addHDD.sh

@ -113,11 +113,27 @@ if [ ${existsHDD} -gt 0 ]; then
echo "OK HDD got added ... returning to provisioning"
exit 1
else
# when normal setup
# 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
# HDD is empty - let setupBlitz - display next options
echo "HDD empty --> go setup"

1
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

Loading…
Cancel
Save