#516 format HDD just on confirmation

This commit is contained in:
Christian Rotzoll
2019-04-16 19:29:47 +01:00
parent 71be71c721
commit 9e6914dfa5

View File

@@ -70,6 +70,21 @@ if [ ${existsHDD} -eq 1 ]; then
echo "FAIL - HDD is mounted"
echo "If you really want to reinit the HDD, then unmount the HDD first and try again"
else
echo ""
dialog --title "Format HDD" --yes-button "Yes" --no-button "Cancel" --yesno "RaspiBlitz detected a Hard Disk Drive (HDD).
It will get formatted to EXT4 to be usefull.
This will DELETE ALL FORMER DATA on the HDD.
Is it OK to delete HDD for fresh RaspiBlitz?
" 10 48
if [ $? -eq 1 ]; then
dialog --title "Replace HDD" --msgbox "OK. RaspiBlitz will shutdown now.
Please disconnect Power then.
Backup HDD data or connect another one.
Then Power up again." 8 39
sudo shutdown now
exit 1
fi
echo ""
echo "*** Formatting the HDD ***"
echo "WARNING ALL DATA ON HDD WILL GET DELETED - CAN TAKE SOME TIME"