From 3455c4bfe9cfdc28597716512bb323bbe68c3d5d Mon Sep 17 00:00:00 2001 From: natemaia Date: Sat, 7 Mar 2020 16:24:38 -0800 Subject: [PATCH] Add device label info to partition menus --- archlabs-installer | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/archlabs-installer b/archlabs-installer index b2699ca..409ce2d 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -5,7 +5,7 @@ # Some ideas and code reworked from other resources # AIF, Calamares, and the Arch Wiki.. Credit where credit is due -VER=2.1.20 +VER=2.1.21 # default values { @@ -716,11 +716,11 @@ part_find() fi (( COUNT++ )) fi - done < <(lsblk -lno TYPE,NAME,SIZE,FSTYPE | + done < <(lsblk -lno TYPE,PATH,SIZE,FSTYPE,LABEL | awk "/$regexp/"' && !'"/${IGNORE_DEV:-NONEXX}/"' { - sub(/^part/, "/dev/") - sub(/^lvm|^crypt/, "/dev/mapper/") - print $1$2, $3"__"$4 + if ($4 == "") { $4 = "unformatted" } + if ($5 == "") { $5 = "unlabeled" } + print $2, $3 "__" $4 "__" $5 }') case "$regexp" in @@ -999,13 +999,13 @@ select_root() else local pts dev size isize ptcount=0 - # walk partition list and skip ones that are < 4G + # walk partition list and skip ones that are < 8G while read -r dev size; do s=${size%%__*} size_t="${s: -1:1}" isize=${s:0:-1} isize=${isize%.*} - if ! [[ $size_t == 'M' || ($size_t == 'G' && $isize -lt 4) ]]; then + if ! [[ $size_t == 'M' || ($size_t == 'G' && $isize -lt 8) ]]; then pts+="$dev $size " (( ptcount++ )) fi @@ -1016,7 +1016,7 @@ select_root() ROOT="$(awk 'NF > 0 {print $1}' <<< "$pts")" else local txt="\nSelect the root (/) partition, this is where $DIST will be installed." - txt+="\n\nDevices smaller than 4G will not be shown here." + txt+="\n\nDevices smaller than 8G will not be shown here." dlg ROOT menu "Mount Root" "$txt" $pts fi fi @@ -1047,7 +1047,7 @@ select_swap() dlg SWAP menu "Swap Setup" "\nSelect whether to use a swapfile, swap partition, or none." \ "none" "No swap space" \ - "swapfile" "/swapfile (recommended -- editable size)" \ + "swapfile" "/swapfile (editable size)" \ $pts if [[ -z $SWAP || $SWAP == "none" ]]; then