Remove: Since systemd 255+ and mkinitcpio 38+, a lot of Swapping configuration has been deprecated due to systemd's amazing automation, so it has been removed (as being redundunt) from the installer, following the latest guidelines.

Add: Sanity Check > When several partition of the same type {root,ESP,home,swap} are detected, the installer will warn and manage ONLY the ones relevant to your currently detected preferences.
Indentation.
This commit is contained in:
Jane Doe 2024-06-23 15:35:58 +00:00
parent 28c3450b45
commit feee5e36c6

View file

@ -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
@ -2753,7 +2753,7 @@ ${multi_boot}
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
@ -2805,7 +2805,7 @@ ${multi_home}
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