feat: add warning message to ensure users have freed devices before partitioning. Closes #22.

This commit is contained in:
oddlama 2022-05-13 21:28:23 +02:00
parent 2003738dca
commit 1dbb0b29d6
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
1 changed files with 10 additions and 0 deletions

View File

@ -707,6 +707,16 @@ function summarize_disk_actions() {
function apply_disk_configuration() {
summarize_disk_actions
if [[ ]]; then
elog "You have chosen an existing disk configuration. No devices will"
elog "actually be re-partitioned or formatted. Please make sure that all"
elog "devices are already formatted."
else
ewarn "Please ensure that all selected devices are fully unmounted and are"
ewarn "not otherwise in use by the system. This includes stopping mdadm arrays"
ewarn "and closing opened luks volumes if applicable for all relevant devices."
ewarn "Otherwise, automatic partitioning may fail."
fi
ask "Do you really want to apply this disk configuration?" \
|| die "Aborted"
countdown "Applying in " 5