From 63fb701354f4850ec60b9b36b89f6093ab7f01a6 Mon Sep 17 00:00:00 2001 From: natemaia Date: Tue, 27 Aug 2019 00:00:12 -0700 Subject: [PATCH] Cleanup LVM section --- archlabs-installer | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/archlabs-installer b/archlabs-installer index 24771b2..de58ff1 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -761,7 +761,8 @@ part_menu() txt+="A $boot_fs efi boot partition (512M)\n- " fi txt+="An ext4 partition using all remaining space ($root_size)\n\nDo you want to continue?\n" - yesno "Auto Partition" "$txt" && part_auto "$device" "$table" "$boot_fs" "$root_size" + yesno "Auto Partition" "$txt" && msg "Info" "\nGathering device info.\n" 0 && part_auto "$device" "$table" "$boot_fs" "$root_size" + else clear tput cnorm @@ -1930,6 +1931,7 @@ prerun_systemd-boot() lvm_menu() { + msg "Info" "\nGathering device info.\n" 0 is_bg_install || return 1 lvm_detect local choice @@ -2025,14 +2027,14 @@ get_lv_size() lvm_mkgroup() { local named='' - local txt="\nConfirm creation of volume group: $VGROUP\n\nwith the following partition(s):" until [[ $named ]]; do lvm_partitions || return 1 lvm_group_name || return 1 - yesno "$_lvmnew" "$txt $LVM_PARTS\n" && named=true + yesno "$_lvmnew" "\nConfirm creation of volume group: $VGROUP\n\nwith the following partition(s): $LVM_PARTS\n" && named=true done + msg "$_lvmnew" "\nCreating group: $VGROUP (${SIZE}$SIZE_UNIT)\n" 0 vgcreate -f "$VGROUP" $LVM_PARTS >/dev/null 2>$ERR errshow "vgcreate -f $VGROUP $LVM_PARTS" || return 1 @@ -2045,7 +2047,7 @@ lvm_mkgroup() VGROUP_MB=$SIZE fi - msg "$_lvmnew" "\nVolume group: $VGROUP ($SIZE $SIZE_UNIT) has been created\n" + msg "$_lvmnew" "\nVolume group: $VGROUP (${SIZE}$SIZE_UNIT) has been created\n" return 0 } @@ -2110,7 +2112,7 @@ lvm_group_name() dlg VGROUP input "$_lvmnew" "$_lvmvgname" "mygroup" if [[ -z $VGROUP ]]; then return 1 - elif [[ ${VGROUP:0:1} == "/" || $VGROUP =~ \ |\' ]] || lsblk | grep -q "$VGROUP"; then + elif [[ ${VGROUP:0:1} == "/" || $VGROUP =~ \ |\' ]] || vgdisplay | grep -q "$VGROUP"; then msg "LVM Name Error" "$_lvmerrvgname" VGROUP='' fi