mirror of
https://gitlab.com/prism7/archery.git
synced 2025-02-15 08:29:17 +01:00
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:
parent
28c3450b45
commit
feee5e36c6
1 changed files with 12 additions and 34 deletions
38
Amelia.sh
38
Amelia.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Amelia Installer
|
# Amelia Installer
|
||||||
# Version: 5.8
|
# Version: 5.9
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
|
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
|
||||||
|
@ -2753,7 +2753,7 @@ ${multi_boot}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${homecount}" -gt "1" ]]; then
|
if [[ ${fs} == "1" && "${homecount}" -gt "1" ]]; then
|
||||||
local prompt="Confirm /Home Partition"
|
local prompt="Confirm /Home Partition"
|
||||||
local stage_prompt="Partition"
|
local stage_prompt="Partition"
|
||||||
sleep 0.3
|
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|$'
|
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 "
|
NC "
|
||||||
|
@ -2784,7 +2784,7 @@ ${multi_home}
|
||||||
|
|
||||||
|
|
||||||
### Partition ${nc}${home_comply} ${yellow}is auto-assigned as such and will be ${red}[!] FORMATTED [!]
|
### Partition ${nc}${home_comply} ${yellow}is auto-assigned as such and will be ${red}[!] FORMATTED [!]
|
||||||
"
|
"
|
||||||
BLUE "
|
BLUE "
|
||||||
|
|
||||||
|
|
||||||
|
@ -2805,7 +2805,7 @@ ${multi_home}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${swapcount}" -gt "1" ]]; then
|
if [[ ${swapmode} == "1" && "${swapcount}" -gt "1" ]]; then
|
||||||
local prompt="Confirm /Swap Partition"
|
local prompt="Confirm /Swap Partition"
|
||||||
local stage_prompt="Partition"
|
local stage_prompt="Partition"
|
||||||
sleep 0.3
|
sleep 0.3
|
||||||
|
@ -4437,7 +4437,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||||
|
|
||||||
if pacstrap -K -i /mnt ${deskpkgs} ; then
|
if pacstrap -K -i /mnt ${deskpkgs} ; then
|
||||||
if [[ "${fs}" == "2" ]]; 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
|
sleep 0.3
|
||||||
NC "
|
NC "
|
||||||
|
|
||||||
|
@ -4625,28 +4625,6 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Chroot &
|
||||||
|
|
||||||
#### Unencrypted Setup Vars
|
#### Unencrypted Setup Vars
|
||||||
elif [[ "${encrypt}" == "no" ]]; then
|
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
|
### Graphics Setup
|
||||||
## Configuration = 'Yes'
|
## Configuration = 'Yes'
|
||||||
if [[ "${vgaconf}" == "y" ]]; then
|
if [[ "${vgaconf}" == "y" ]]; then
|
||||||
|
@ -4716,10 +4694,10 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Chroot &
|
||||||
|
|
||||||
if [[ "${autoroot}" == "y" ]]; then
|
if [[ "${autoroot}" == "y" ]]; then
|
||||||
### Kernel Boot Options [Multi-Root Disk] (No Encryption)
|
### 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
|
else
|
||||||
### Kernel Boot Options [Single Root Disk] (No Encryption)
|
### 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
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue