From 1dbb0b29d6af993f2d36aaf9fbe424c2ffb962b9 Mon Sep 17 00:00:00 2001 From: oddlama Date: Fri, 13 May 2022 21:28:23 +0200 Subject: [PATCH] feat: add warning message to ensure users have freed devices before partitioning. Closes #22. --- scripts/functions.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/functions.sh b/scripts/functions.sh index ce9c0a1..9c11687 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -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