diff --git a/Amelia.sh b/Amelia.sh index e8fb004..952acb9 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -1,7 +1,7 @@ #!/bin/bash # Amelia Installer -# Version: 5.8 +# Version: 5.9 set -euo pipefail trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR @@ -2629,7 +2629,7 @@ ${magenta}###${nc}--------------------------------------${magenta}[ ${bwhite}San swap_dev="$(fdisk -l "${instl_drive}" | grep -E 'swap' | awk "{print \$1}")" multi_swap="$(fdisk -l "${instl_drive}" | grep -E 'swap' | awk "{print \$1}" | cat --number)" swap_comply="$(fdisk -l "${instl_drive}" | grep -E 'swap' | awk "{print \$1}" | cat --number | grep -E '1[[:blank:]]' | awk "{print \$2}")" - + if [[ "${rootcount}" -gt "1" ]]; then local prompt="Confirm /Root Partition" local stage_prompt="Partition" @@ -2682,7 +2682,7 @@ ${multi_root} return 1 fi fi - + if [[ "${bootcount}" -gt "1" ]]; then local prompt="Confirm /Boot Partition" local stage_prompt="Partition" @@ -2752,8 +2752,8 @@ ${multi_boot} return 1 fi fi - - if [[ "${homecount}" -gt "1" ]]; then + + if [[ ${fs} == "1" && "${homecount}" -gt "1" ]]; then local prompt="Confirm /Home Partition" local stage_prompt="Partition" sleep 0.3 @@ -2768,7 +2768,7 @@ ${multi_boot} " lsblk -f "${instl_drive}"|GREP_COLORS='mt=01;36' grep -E --color=always 'vfat|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'ext4|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'btrfs|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'ntfs|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'swap|$' - YELLOW " + YELLOW " ###-----------------------------------------------------------------------------------------------------------------###" NC " @@ -2784,7 +2784,7 @@ ${multi_home} ### Partition ${nc}${home_comply} ${yellow}is auto-assigned as such and will be ${red}[!] FORMATTED [!] - " + " BLUE " @@ -2804,8 +2804,8 @@ ${multi_home} return 1 fi fi - - if [[ "${swapcount}" -gt "1" ]]; then + + if [[ ${swapmode} == "1" && "${swapcount}" -gt "1" ]]; then local prompt="Confirm /Swap Partition" local stage_prompt="Partition" sleep 0.3 @@ -4437,7 +4437,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs if pacstrap -K -i /mnt ${deskpkgs} ; then if [[ "${fs}" == "2" ]]; then - genfstab -t PARTUUID /mnt >> /mnt/etc/fstab > /dev/null 2>&1 || err_abort + genfstab -t PARTUUID /mnt >> /mnt/etc/fstab || err_abort sleep 0.3 NC " @@ -4625,28 +4625,6 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Chroot & #### Unencrypted Setup Vars elif [[ "${encrypt}" == "no" ]]; then - ### Swap Setup - ## Swap Partition - if [[ "${swapmode}" == "1" ]]; then - # Swap Partition Kernel Boot Options - swap_bootopts="resume=UUID=$(blkid -s UUID -o value "${swap_dev}") " - ## Swapfile - elif [[ "${swapmode}" == "2" ]]; then - # Ext4 Offset - if [[ "${fs}" == "1" ]]; then - offst="$(filefrag -v /mnt/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}')" - # Btrfs Offset - elif [[ "${fs}" == "2" ]]; then - offst="$(btrfs inspect-internal map-swapfile -r /mnt/swap/swapfile)" - fi - # Swapfile Kernel Boot Options - swap_bootopts="resume=UUID=$(blkid -s UUID -o value "${root_dev}") resume_offset=${offst} " - ## No Swap - elif [[ "${swapmode}" == "3" ]]; then - # No Swap Kernel Boot Options - swap_bootopts="" - fi - ### Graphics Setup ## Configuration = 'Yes' if [[ "${vgaconf}" == "y" ]]; then @@ -4716,10 +4694,10 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Chroot & if [[ "${autoroot}" == "y" ]]; then ### Kernel Boot Options [Multi-Root Disk] (No Encryption) - boot_opts="${multiroot_opts}${swap_bootopts}${vga_bootopts}${cust_bootopts}${btrfs_bootopts}" + boot_opts="${multiroot_opts}${vga_bootopts}${cust_bootopts}${btrfs_bootopts}" else ### Kernel Boot Options [Single Root Disk] (No Encryption) - boot_opts="${swap_bootopts}${vga_bootopts}${cust_bootopts}${btrfs_bootopts}" + boot_opts="${vga_bootopts}${cust_bootopts}${btrfs_bootopts}" fi fi