summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrystian Chachuła <krystian@krystianch.com>2021-11-16 20:12:38 +0100
committerKrystian Chachuła <krystian@krystianch.com>2021-11-16 21:07:09 +0100
commitc43b38051149f0685fcb22e253de8bba432872e0 (patch)
treec80608766a6bc7d12c84328cc8bd757bfa4ecbcd
parent95786eefc6861bfce3cafa6cf862f715cd4dc31b (diff)
downloadalpine-conf-c43b38051149f0685fcb22e253de8bba432872e0.zip
setup-disk: make the order of 'crypt' and 'lvm' obvious
The order of 'crypt' and 'lvm' can be confusing. This commit disables suggesting 'crypt' when 'lvm' is selected. It also adds a statement about the order of LVM and LUKS when both are selected.
-rw-r--r--setup-disk.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/setup-disk.in b/setup-disk.in
index c060ae2..5fce292 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -1521,11 +1521,14 @@ if [ -n "$diskdevs" ] && [ -z "$DISK_MODE" ]; then
while true; do
echo -n "The following $disk_is_or_disks_are selected"
- echo "${USE_CRYPT:+ (with crypt)}${USE_LVM:+ (with LVM)}:"
+ [ -n "$USE_CRYPT" ] && [ -z "$USE_LVM" ] && echo -n " (with encryption)"
+ [ -z "$USE_CRYPT" ] && [ -n "$USE_LVM" ] && echo -n " (with LVM)"
+ [ -n "$USE_CRYPT" ] && [ -n "$USE_LVM" ] && echo -n " (with LVM on LUKS)"
+ echo ":"
show_disk_info $diskdevs
- _crypt=${USE_CRYPT:-", 'crypt'"}
+ _crypt=$([ -z "$USE_CRYPT" ] && [ -z "$USE_LVM" ] && echo ", 'crypt'")
_lvm=${USE_LVM:-", 'lvm'"}
- ask "How would you like to use $it_them? ('sys', 'data'${_crypt#_crypt}${_lvm#_lvm} or '?' for help)" "?"
+ ask "How would you like to use $it_them? ('sys', 'data'$_crypt${_lvm#_lvm} or '?' for help)" "?"
case "$resp" in
'?') diskmode_help;;
sys|data) break;;