Reduce duplicate irrelevant partitions during mounting when using LUKS & LVM

This commit is contained in:
natemaia 2018-07-28 12:59:12 -07:00
parent 08adbd2984
commit 99261c5661
2 changed files with 7 additions and 4 deletions

View File

@ -15,7 +15,7 @@
# immutable variables { # immutable variables {
readonly DIST="Archlabs" # Linux distributor readonly DIST="Archlabs" # Linux distributor
readonly VER="1.6.10" # Installer version readonly VER="1.6.11" # Installer version
readonly LIVE="liveuser" # Live session user name readonly LIVE="liveuser" # Live session user name
readonly TRN="/installer" # Translation path readonly TRN="/installer" # Translation path
readonly MNT="/mnt/install" # Install mountpoint readonly MNT="/mnt/install" # Install mountpoint
@ -1027,11 +1027,14 @@ select_root_partition() {
if (( LUKS == 1 && LVM == 0 )); then if (( LUKS == 1 && LVM == 0 )); then
ROOT_PART="/dev/mapper/$LUKS_NAME" ROOT_PART="/dev/mapper/$LUKS_NAME"
decrease_part_count "$LUKS_PART" decrease_part_count "$LUKS_PART"
elif (( LUKS == 1 && LVM == 1 )); then
decrease_part_count "$LUKS_PART"
decrease_part_count "/dev/mapper/$LUKS_NAME"
fi fi
if (( COUNT == 1 )); then if (( COUNT == 1 )) && [[ $ROOT_PART == "" ]]; then
ROOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")" ROOT_PART="$(awk 'NF > 0 {print $1}' <<< "$PARTS")"
infobox "$_PrepMount" "\nOnly one partition available: $ROOT_PART\n" infobox "$_PrepMount" "\nOnly one partition available for root (/): $ROOT_PART\n"
elif [[ $ROOT_PART == "" || $LVM -eq 1 ]]; then elif [[ $ROOT_PART == "" || $LVM -eq 1 ]]; then
tput civis tput civis
ROOT_PART="$(dialog --cr-wrap --stdout --backtitle "$BT" --title "$_PrepMount" \ ROOT_PART="$(dialog --cr-wrap --stdout --backtitle "$BT" --title "$_PrepMount" \

View File

@ -147,7 +147,7 @@ _MntTitle="Mount Status"
_MntSucc="\nMount Successful!\n" _MntSucc="\nMount Successful!\n"
_MntFail="\nMount Failed!\n" _MntFail="\nMount Failed!\n"
_WarnMount="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nPartitions can be mounted without formatting them by selecting the '$_Skip' option from the menu, otherwise the partition will be formatted.\n" _WarnMount="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nPartitions can be mounted without formatting them by selecting the '$_Skip' option from the menu, otherwise the partition will be formatted.\n"
_MntBody="\nUse [Space] to de/select the desired mount options.\n\nKernel default: relatime\n\nFor SSD's the 'discard' option provides active TRIM support.\n\nChoosing none will result in an automatic mount with system applied options." _MntBody="\nUse [Space] to de/select the desired mount options.\n\nFor SSD's the 'discard' option provides active TRIM support.\n\nChoosing none will result in an automatic mount with system applied options."
_MntConfBody="\nConfirm the following mount options:" _MntConfBody="\nConfirm the following mount options:"
# Select Device # Select Device