diff --git a/scripts/config.sh b/scripts/config.sh index 6519aaf..0bc92ef 100644 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -27,6 +27,8 @@ USED_ZFS=false USED_BTRFS=false # Flag to track usage of encryption USED_ENCRYPTION=false +# Flag to track whether partitioning or formatting is forbidden +NO_PARTITIONING_OR_FORMATTING=false # An array of disk related actions to perform DISK_ACTIONS=() @@ -355,6 +357,8 @@ function create_single_disk_layout() { # boot= Use the given device as the bios/efi partition. # type=[efi|bios] Selects the boot type. Defaults to efi if not given. function create_existing_partitions_layout() { + NO_PARTITIONING_OR_FORMATTING=true + local known_arguments=('+swap' '+boot' '?type') local extra_arguments=() declare -A arguments; parse_arguments "$@" diff --git a/scripts/functions.sh b/scripts/functions.sh index 9c11687..42ed4d2 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -707,7 +707,7 @@ function summarize_disk_actions() { function apply_disk_configuration() { summarize_disk_actions - if [[ ]]; then + if [[ $NO_PARTITIONING_OR_FORMATTING == true ]]; 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."