Add: New feature > The installer now offers automatic, post-installation, UKI creation for all Kernels

Change: Some prompt edits, identation fixes, code refinement.
This commit is contained in:
Jane Doe
2026-04-07 23:03:29 +03:00
parent e4d57713ae
commit fe5ca09c87
+206 -157
View File
@@ -1,8 +1,9 @@
#!/bin/bash
#!/usr/bin/env bash
# Amelia installer for Archlinux
# Version: 1.4.3
# Version: 1.5.0
# Source: https://gitlab.com/prism7/archery
# shellcheck disable=SC2154
set -euo pipefail
@@ -615,7 +616,7 @@ slct_shell() {
sys_submn() {
title "System Configuration"
ask "Select a Submenu"
NC "\n\n [1] Kernel, Secureboot Signing, Bootloader & ESP Mountpoint\n\n [2] Filesystem & Swap Setup\n\n [3] Graphics Setup\n\n [4] Desktop Setup\n\n [5] EFI Boot Entries Deletion\n\n [6] Extended Options\n\n [ ] Return to Main Menu"
NC "\n\n [1] Kernel, Secure Boot Signing, Bootloader & ESP Mountpoint\n\n [2] Filesystem & Swap Setup\n\n [3] Graphics Setup\n\n [4] Desktop Setup\n\n [5] EFI Boot Entries Deletion\n\n [6] Extended Options\n\n [ ] Return to Main Menu"
get "Enter a number"
read -r -p "==> " sysmenu
case "${sysmenu}" in
@@ -681,7 +682,7 @@ slct_krnl() {
ok
}
ask_sign() {
title "Secureboot Signing"
title "Secure Boot Signing"
ask "Sign UKI(s), Kernel & binaries for use with Secure Boot ? [y/N]"
get "Enter [y/N]"
read -r -p "==> " sb_sign
@@ -733,7 +734,27 @@ slct_bootldr() {
1)
uki="y"
ukify="systemd-ukify"
ack "Systemd-boot has been selected" ;;
ack "Systemd-boot has been selected"
local prompt="UKI(s) Auto-generation"
CYAN "\n\n\n ### ${nc}UKIs can be generated for every additional Kernel installed\n\n${cyan} ### ${nc}Secure Boot signing will be performed automatically for all subsequent UKIs"
ask "Automate UKI(s) generation ? [Y/n]"
get "Enter [Y/n]"
read -r -p "==> " uki_use
uki_use="${uki_use:-y}"
uki_use="${uki_use,,}"
case "${uki_use}" in
y)
ack "UKI(s) Auto-generation has been selected" ;;
n)
skip ;;
"")
y_n
reload
return 1 ;;
*)
invalid
return 1 ;;
esac ;;
2)
uki="n"
ask "Select a Boot Path to install to"
@@ -2757,7 +2778,7 @@ instl() {
until slct_shell; do : ; done
fi
if [[ -z "${kernelnmbr}" || "${revision}" == "y" ]]; then
local stage_prompt="Kernel, Secureboot Signing, Bootloader & ESP Mountpoint"
local stage_prompt="Kernel, Secure Boot Signing, Bootloader & ESP Mountpoint"
completion_err
until slct_krnl; do : ; done
until ask_sign; do : ; done
@@ -3415,7 +3436,7 @@ revise() {
revision="y"
gfxpkgs=()
validpkgs=()
reset=(trg="" xbootloader="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" lowlat="" nogsp="" sanity="" partok="" preset="" set_ext_opt="" ask_param="" kill_watchdog="" sys_optm="" desk_setup="" devel="" web="" web_pkg="" web_aur="" web_slct="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" show_extopts="" gptslct="" gptok="" gptabort="" nvidiaprop="" nowarning="" hometype="" homeform="" smartpart="" LuksParts="" nvidia_aur="" web_aur_url="" session="" alt_session="" session_support="" alt_session_pack="")
reset=(trg="" xbootloader="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" lowlat="" nogsp="" sanity="" partok="" preset="" set_ext_opt="" ask_param="" kill_watchdog="" sys_optm="" desk_setup="" devel="" web="" web_pkg="" web_aur="" web_slct="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" show_extopts="" gptslct="" gptok="" gptabort="" nvidiaprop="" nowarning="" hometype="" homeform="" smartpart="" LuksParts="" nvidia_aur="" web_aur_url="" session="" alt_session="" session_support="" alt_session_pack="" uki_use="" p="" k="")
export "${reset[@]}"
instl
}
@@ -3669,6 +3690,7 @@ pkg_collection() {
[[ "${vendor}" == "Virtual Machine" ]] && basepkgs+=("${vmpkgs}")
[[ "${vendor}" != "Virtual Machine" ]] && basepkgs+=(alsa-firmware linux-firmware sof-firmware)
[[ "${terminal}" == "y" ]] && basepkgs+=(gnome-terminal)
[[ "${sb_sign}" == "y" ]] && basepkgs+=(sbctl)
[[ "${nvidiaprop}" == "y" ]] && basepkgs+=("${kernel}-headers")
[[ "${session_support}" == "y" ]] && basepkgs+=("${alt_session_pack}")
[[ ! "${desktop}" =~ ^(11|12)$ ]] && basepkgs+=(7zip alsa-plugins alsa-utils bluez bluez-hid2hci bluez-obex bluez-utils exfatprogs git glibc-locales gst-libav gst-plugin-libcamera gst-plugin-pipewire gst-plugins-bad gst-plugins-good gst-plugins-ugly libfido2 man-db man-pages mesa-utils nano-syntax-highlighting pacman-contrib pipewire-alsa pipewire-libcamera pipewire-onnx pipewire-pulse pipewire-zeroconf reflector usb_modeswitch xdg-user-dirs)
@@ -3716,6 +3738,7 @@ pkg_collection() {
[[ -n "${print_pkgs}" ]] && custarray+=("${print_pkgs}")
[[ "${vendor}" == "Virtual Machine" ]] && custarray+=("${vmpkgs}")
[[ "${vendor}" != "Virtual Machine" ]] && custarray+=(linux-firmware)
[[ "${sb_sign}" == "y" ]] && custarray+=(sbctl)
[[ "${nvidiaprop}" == "y" ]] && custarray+=("${kernel}-headers")
deskpkgs="${custarray[*]}" ;;
13) # Cosmic Desktop:
@@ -3736,7 +3759,7 @@ pkg_validation() {
keypress
valids="${validpkgs[*]}"
printf "\n\n"
if pacman -Syy > "${void}" 2>&1 2> "${log}" && pacman -Spd ${valids} > "${void}" 2>&1 2> "${log}"; then
if pacman -Syy > "${log}" 2>&1 && pacman -Spd ${valids} > "${log}" 2>&1; then
ok
if [[ -n "${web_aur}" ]]; then
local prompt="${web_name} Package Validation"
@@ -3782,9 +3805,9 @@ pacstrap_system() {
YELLOWL "\n\n\n ---------------------------------------\n ### ${nc}Building ${bwhite}Nvidia-580xx ${nc}Drivers ${yellowl}###\n ---------------------------------------${nc}\n ... Please Wait ...\n\n\n"
if [[ "${dev}" != "y" ]]; then
local stage_prompt="Base-devel Package Installation"
if arch-chroot /mnt <<-BASE_DEVEL > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-BASE_DEVEL > "${log}" 2>&1 ; then
pacman -S --noconfirm base-devel
BASE_DEVEL
BASE_DEVEL
stage_ok
else
stage_fail
@@ -3792,21 +3815,21 @@ BASE_DEVEL
fi
if [[ "${desktop}" =~ ^(11|12)$ ]]; then
local stage_prompt="Git Package Installation"
if arch-chroot /mnt <<-GIT > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GIT > "${log}" 2>&1 ; then
pacman -S --noconfirm git
GIT
GIT
stage_ok
else
stage_fail
fi
fi
local stage_prompt="AUR Nvidia Packages Installation"
if arch-chroot /mnt <<-AUR_NVIDIA_PKGS > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-AUR_NVIDIA_PKGS > "${log}" 2>&1 ; then
sed -i 's|if (( EUID == 0 )); then|if (( EUID != 0 )); then|g' /usr/bin/makepkg
git clone --branch nvidia-580xx-utils --single-branch https://github.com/archlinux/aur.git nvidia-580xx-utils && cd nvidia-580xx-utils && makepkg -s --noconfirm && sudo pacman -U --noconfirm *x86_64.pkg.tar.zst && cd .. && rm -rf nvidia-580xx-utils
git clone --branch nvidia-580xx-settings --single-branch https://github.com/archlinux/aur.git nvidia-580xx-settings && cd nvidia-580xx-settings && makepkg -s --noconfirm && sudo pacman -U --noconfirm *x86_64.pkg.tar.zst && cd .. && rm -rf nvidia-580xx-settings
sed -i 's|if (( EUID != 0 )); then|if (( EUID == 0 )); then|g' /usr/bin/makepkg
AUR_NVIDIA_PKGS
AUR_NVIDIA_PKGS
stage_ok
else
stage_fail
@@ -3822,9 +3845,9 @@ AUR_NVIDIA_PKGS
local prompt="Fstab"
local stage_prompt="Fstab"
genfstab -t PARTUUID /mnt >> /mnt/etc/fstab 2> "${log}" || stage_fail
arch-chroot /mnt <<-FSTAB_SBVL_MNT_OPTS > "${void}" 2>&1 2> "${log}" || stage_fail
arch-chroot /mnt <<-FSTAB_SBVL_MNT_OPTS > "${log}" 2>&1 || stage_fail
sed -i 's/^rw.*/${sbvl_mnt_opts}/' /etc/fstab
FSTAB_SBVL_MNT_OPTS
FSTAB_SBVL_MNT_OPTS
ok
fi
if [[ "${swapmode}" != "2" ]]; then
@@ -3835,12 +3858,12 @@ swapfile() {
local prompt="Swapfile Setup"
local stage_prompt="Swapfile Setup"
title "${prompt}"
if arch-chroot /mnt <<-SWAPFILE > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-SWAPFILE > "${log}" 2>&1 ; then
mkswap -U clear --size ${swapsize}G --file /swapfile
SWAPFILE
SWAPFILE
cat >> /mnt/etc/fstab <<-FSTAB || err_abort
/swapfile none swap defaults 0 0
FSTAB
FSTAB
ok
else
stage_fail
@@ -3850,12 +3873,12 @@ swapfile_btrfs() {
local prompt="Btrfs Swapfile Setup"
local stage_prompt="Btrfs Swapfile Setup"
title "${prompt}"
if arch-chroot /mnt <<-SWAPFILE_BTRFS > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-SWAPFILE_BTRFS > "${log}" 2>&1 ; then
btrfs filesystem mkswapfile --size ${swapsize}g --uuid clear /swap/swapfile
SWAPFILE_BTRFS
SWAPFILE_BTRFS
cat >> /mnt/etc/fstab <<-FSTAB || err_abort
/swap/swapfile none swap defaults 0 0
FSTAB
FSTAB
ok
else
stage_fail
@@ -3873,7 +3896,7 @@ set_wireless_regdom() {
}
main_chroot() {
local stage_prompt="Base System Configuration"
if arch-chroot /mnt <<-CONF > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-CONF > "${log}" 2>&1 ; then
sed -i "/^#${SETLOCALE}/s/^#//" /etc/locale.gen
locale-gen
echo LANG=${SETLOCALE} > /etc/locale.conf
@@ -3883,7 +3906,7 @@ main_chroot() {
${mkinitcpio_mods}
${mkinitcpio_bins}
${mkinitcpio_hooks}
MKINITCPIO
MKINITCPIO
mkinitcpio -P
ln -sf /usr/share/zoneinfo/$(curl -s http://ip-api.com/line?fields=timezone) /etc/localtime
hwclock --systohc
@@ -3892,14 +3915,14 @@ MKINITCPIO
127.0.0.1 localhost
::1 localhost
127.0.1.1 ${HOSTNAME}.localdomain ${HOSTNAME}
HOSTS
HOSTS
echo root:${ROOTPASSWD2} | chpasswd
chsh -s /bin/${shellname}
useradd -m -G wheel -s /bin/${shellname} ${USERNAME}
echo ${USERNAME}:${USERPASSWD2} | chpasswd
echo "%wheel ALL=(ALL) ALL" | tee /etc/sudoers.d/sudoersd
visudo -c /etc/sudoers.d/sudoersd
CONF
CONF
stage_ok
else
stage_fail
@@ -3912,7 +3935,7 @@ mkinitcpio_preset() {
fi
if [[ "${setrescue}" == "y" ]]; then
local stage_prompt="Uki + Rescue Uki Creation"
if arch-chroot /mnt <<-UKI_RESCUE > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-UKI_RESCUE > "${log}" 2>&1 ; then
mkdir /etc/cmdline.d
echo "rw ${boot_opts[*]}" | tee /etc/cmdline.d/cmdlined.conf
echo "systemd.unit=rescue.target rw ${boot_opts[*]}" | tee /etc/cmdline.d/rescued.conf
@@ -3926,16 +3949,16 @@ mkinitcpio_preset() {
default_options="--cmdline /etc/cmdline.d/cmdlined.conf"
rescue_uki="${btldr_esp_mount}/EFI/Linux/rescue.efi"
rescue_options="--cmdline /etc/cmdline.d/rescued.conf"
MKINITCPIO_PRESET
MKINITCPIO_PRESET
mkinitcpio -P
UKI_RESCUE
UKI_RESCUE
stage_ok
else
stage_fail
fi
elif [[ -z "${setrescue}" ]]; then
elif [[ "${setrescue}" == "n" ]]; then
local stage_prompt="Uki Creation"
if arch-chroot /mnt <<-UKI > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-UKI > "${log}" 2>&1 ; then
mkdir /etc/cmdline.d
echo "rw ${boot_opts[*]}" | tee /etc/cmdline.d/cmdlined.conf
cp /etc/mkinitcpio.d/${kernel}.preset /etc/mkinitcpio.d/${kernel}.preset.bak
@@ -3945,10 +3968,10 @@ UKI_RESCUE
ALL_kver="/boot/vmlinuz-${kernel}"
PRESETS=('default')
default_uki="${btldr_esp_mount}/EFI/Linux/arch-${kernel}.efi"
default_options="--cmdline /etc/cmdline.d/cmdlined.conf
MKINITCPIO_PRESET
default_options="--cmdline /etc/cmdline.d/cmdlined.conf"
MKINITCPIO_PRESET
mkinitcpio -P
UKI
UKI
stage_ok
else
stage_fail
@@ -3961,7 +3984,7 @@ UKI
done
elif [[ "${uki}" == "n" ]]; then
local stage_prompt="Initramfs Creation"
if arch-chroot /mnt <<-INITRAMFS > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-INITRAMFS > "${log}" 2>&1 ; then
cp /etc/mkinitcpio.d/${kernel}.preset /etc/mkinitcpio.d/${kernel}.preset.bak
cat <<-MKINITCPIO_PRESET > /etc/mkinitcpio.d/${kernel}.preset
# mkinitcpio preset file for the '${kernel}' package
@@ -3969,9 +3992,9 @@ UKI
ALL_kver="/boot/vmlinuz-${kernel}"
PRESETS=('default')
default_image="/boot/initramfs-${kernel}.img"
MKINITCPIO_PRESET
MKINITCPIO_PRESET
mkinitcpio -P
INITRAMFS
INITRAMFS
stage_ok
else
stage_fail
@@ -3982,49 +4005,49 @@ btldrcfg() {
if [[ "${bootloader}" == "1" ]]; then
local stage_prompt="Systemd-boot Configuration"
if [[ "${xbootloader}" == "no" ]]; then
if arch-chroot -S /mnt <<-SDBOOT_INSTL > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot -S /mnt <<-SDBOOT_INSTL > "${log}" 2>&1 ; then
bootctl install
cat <<-LOADER_CFG > ${btldr_esp_mount}/loader/loader.conf
timeout 3
console-mode auto
editor no
LOADER_CFG
LOADER_CFG
systemctl enable systemd-boot-update
SDBOOT_INSTL
SDBOOT_INSTL
stage_ok
else
stage_fail
fi
elif [[ "${xbootloader}" == "yes" ]]; then
if arch-chroot -S /mnt <<-SDBOOT_XBOOTLDR_INSTL > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot -S /mnt <<-SDBOOT_XBOOTLDR_INSTL > "${log}" 2>&1 ; then
bootctl --esp-path=/efi --boot-path=/boot install
cat <<-LOADER_CFG > ${btldr_esp_mount}/loader/loader.conf
default arch.conf
timeout 3
console-mode auto
editor no
LOADER_CFG
LOADER_CFG
cat <<-ENTRY_CFG > /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-${kernel}
initrd /initramfs-${kernel}.img
options rw ${boot_opts[*]}
ENTRY_CFG
ENTRY_CFG
systemctl enable systemd-boot-update
SDBOOT_XBOOTLDR_INSTL
SDBOOT_XBOOTLDR_INSTL
stage_ok
else
stage_fail
fi
if [[ "${setrescue}" == "y" ]]; then
if arch-chroot -S /mnt <<-RESCUE_ENTRY > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot -S /mnt <<-RESCUE_ENTRY > "${log}" 2>&1 ; then
cat <<-XBOOTLDR_RESCUE_CONF > /boot/loader/entries/rescue.conf
title Arch Rescue
linux /vmlinuz-${kernel}
initrd /initramfs-${kernel}.img
options rw systemd.unit=rescue.target ${boot_opts[*]}
XBOOTLDR_RESCUE_CONF
RESCUE_ENTRY
title Arch Rescue
linux /vmlinuz-${kernel}
initrd /initramfs-${kernel}.img
options rw systemd.unit=rescue.target ${boot_opts[*]}
XBOOTLDR_RESCUE_CONF
RESCUE_ENTRY
stage_ok
else
stage_fail
@@ -4033,7 +4056,7 @@ RESCUE_ENTRY
fi
elif [[ "${bootloader}" == "2" ]]; then
local stage_prompt="Grub Configuration"
if arch-chroot /mnt <<-GRUB_CONF > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GRUB_CONF > "${log}" 2>&1 ; then
cp /etc/default/grub /etc/default/grub.bak
cat <<-CFG > /etc/default/grub
GRUB_DEFAULT=0
@@ -4049,47 +4072,47 @@ RESCUE_ENTRY
GRUB_DISABLE_RECOVERY=true
GRUB_DISABLE_OS_PROBER=false
GRUB_TERMINAL_OUTPUT=console
CFG
GRUB_CONF
CFG
GRUB_CONF
stage_ok
else
stage_fail
fi
local stage_prompt="Grub Installation"
if [[ "${sb_sign}" == "y" && "${path}" == "1" ]]; then
if arch-chroot /mnt <<-SB_GRUB_INSTL > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-SB_GRUB_INSTL > "${log}" 2>&1 ; then
grub-install --target=${uefimode} --efi-directory=${btldr_esp_mount} --bootloader-id=GRUB --modules="tpm" --disable-shim-lock --recheck
sed -i 's/SecureBoot/SecureB00t/' ${btldr_esp_mount}/EFI/GRUB/grubx${bitness}.efi
grub-mkconfig -o /boot/grub/grub.cfg
SB_GRUB_INSTL
SB_GRUB_INSTL
stage_ok
else
stage_fail
fi
elif [[ "${sb_sign}" == "y" && "${path}" == "2" ]]; then
if arch-chroot /mnt <<-SB_GRUB_INSTL_RMV > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-SB_GRUB_INSTL_RMV > "${log}" 2>&1 ; then
grub-install --target=${uefimode} --efi-directory=${btldr_esp_mount} --bootloader-id=GRUB --removable --modules="tpm" --disable-shim-lock --recheck
sed -i 's/SecureBoot/SecureB00t/' ${btldr_esp_mount}/EFI/BOOT/${efiname}.EFI
grub-mkconfig -o /boot/grub/grub.cfg
SB_GRUB_INSTL_RMV
SB_GRUB_INSTL_RMV
stage_ok
else
stage_fail
fi
elif [[ "${sb_sign}" == "n" && "${path}" == "1" ]]; then
if arch-chroot /mnt <<-GRUB_INSTL > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GRUB_INSTL > "${log}" 2>&1 ; then
grub-install --target=${uefimode} --efi-directory=${btldr_esp_mount} --bootloader-id=GRUB --recheck
grub-mkconfig -o /boot/grub/grub.cfg
GRUB_INSTL
GRUB_INSTL
stage_ok
else
stage_fail
fi
elif [[ "${sb_sign}" == "n" && "${path}" == "2" ]]; then
if arch-chroot /mnt <<-GRUB_INSTL_RMV > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GRUB_INSTL_RMV > "${log}" 2>&1 ; then
grub-install --target=${uefimode} --efi-directory=${btldr_esp_mount} --bootloader-id=GRUB --removable --recheck
grub-mkconfig -o /boot/grub/grub.cfg
GRUB_INSTL_RMV
GRUB_INSTL_RMV
stage_ok
else
stage_fail
@@ -4097,12 +4120,12 @@ GRUB_INSTL_RMV
fi
if [[ "${setrescue}" == "y" ]]; then
local stage_prompt="Rescue Entry Creation"
if arch-chroot /mnt <<-GRUB_RESCUE_ENTRY > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GRUB_RESCUE_ENTRY > "${log}" 2>&1 ; then
touch /boot/grub/custom.cfg
grep -E -A 11 "'Arch Linux'" /boot/grub/grub.cfg > /boot/grub/custom.cfg
sed -i 's/Arch Linux/Rescue Environment/' /boot/grub/custom.cfg
sed -i '/vmlinuz/ s/$/ systemd.unit=rescue.target/' /boot/grub/custom.cfg
GRUB_RESCUE_ENTRY
GRUB_RESCUE_ENTRY
stage_ok
else
stage_fail
@@ -4110,9 +4133,9 @@ GRUB_RESCUE_ENTRY
fi
if [[ "${fs}" == "2" ]]; then
local stage_prompt="Grub-Btrfsd Service Activation"
if arch-chroot /mnt <<-GRUB_BTRFSD > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GRUB_BTRFSD > "${log}" 2>&1 ; then
systemctl enable grub-btrfsd
GRUB_BTRFSD
GRUB_BTRFSD
stage_ok
else
stage_fail
@@ -4120,10 +4143,10 @@ GRUB_BTRFSD
fi
if [[ "${nvidiaprop}" == "y" ]]; then
local stage_prompt="Grub/Nvidia Configuration"
if arch-chroot /mnt <<-NVIDIA_GRUB > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-NVIDIA_GRUB > "${log}" 2>&1 ; then
sed -i "/^#GRUB_TERMINAL_OUTPUT=console/s/^#//" /etc/default/grub
grub-mkconfig -o /boot/grub/grub.cfg
NVIDIA_GRUB
NVIDIA_GRUB
stage_ok
else
stage_fail
@@ -4134,9 +4157,9 @@ NVIDIA_GRUB
trimcfg() {
if [[ -n "${trim}" ]]; then
local stage_prompt="Trim Service Activation"
if arch-chroot /mnt <<-TRIM > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-TRIM > "${log}" 2>&1 ; then
systemctl enable ${trim}
TRIM
TRIM
stage_ok
else
stage_fail
@@ -4146,9 +4169,9 @@ TRIM
vm_serv() {
if [[ -n "${vm_services}" ]]; then
local stage_prompt="VM Service(s) Activation"
if arch-chroot /mnt <<-VM_SRVC > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-VM_SRVC > "${log}" 2>&1 ; then
systemctl enable ${vm_services}
VM_SRVC
VM_SRVC
stage_ok
else
stage_fail
@@ -4159,22 +4182,22 @@ zramcfg() {
if [[ -n "${zram}" ]]; then
local stage_prompt="Zram Swap Activation"
zram_service="systemd-zram-setup@zram0.service"
if arch-chroot /mnt <<-ZRAM_CONF > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-ZRAM_CONF > "${log}" 2>&1 ; then
mkdir -p /etc/systemd/zram-generator.conf.d
cat <<-ZRAM_GEN > /etc/systemd/zram-generator.conf.d/zram.conf
[zram0]
zram-size = ram / 2
compression-algorithm = zstd
ZRAM_GEN
ZRAM_GEN
cat <<-ZRAM_VM > /etc/sysctl.d/99-vm-zram-parameters.conf
vm.swappiness = 180
vm.watermark_boost_factor = 0
vm.watermark_scale_factor = 125
vm.page-cluster = 0
ZRAM_VM
ZRAM_VM
systemctl daemon-reload
systemctl start ${zram_service}
ZRAM_CONF
ZRAM_CONF
stage_ok
else
stage_fail
@@ -4184,7 +4207,7 @@ ZRAM_CONF
nvidia_hook() {
if [[ "${nvidiaprop}" == "y" && -n "${nvname}" ]]; then
local stage_prompt="Nvidia Hook Creation"
if arch-chroot /mnt <<-NVIDIA_HOOK > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-NVIDIA_HOOK > "${log}" 2>&1 ; then
mkdir -p /etc/pacman.d/hooks/
cat <<-HOOK > /etc/pacman.d/hooks/nvidia.hook
[Trigger]
@@ -4201,8 +4224,8 @@ nvidia_hook() {
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux*) exit 0; esac; done; /usr/bin/mkinitcpio -P'
HOOK
NVIDIA_HOOK
HOOK
NVIDIA_HOOK
stage_ok
else
stage_fail
@@ -4212,10 +4235,10 @@ NVIDIA_HOOK
var_opts() {
if [[ "${multilib}" == "y" ]]; then
local stage_prompt="Multilib Configuration"
if arch-chroot /mnt <<-MULTILIB > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-MULTILIB > "${log}" 2>&1 ; then
sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf
pacman -Syy
MULTILIB
MULTILIB
stage_ok
else
stage_fail
@@ -4223,18 +4246,18 @@ MULTILIB
fi
if [[ "${CPU}" == *"GenuineIntel"* && "${kill_watchdog}" == "y" ]]; then
local stage_prompt="Intel Watchdog Configuration"
if arch-chroot /mnt <<-INTEL_WATCHDOG > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-INTEL_WATCHDOG > "${log}" 2>&1 ; then
echo "blacklist iTCO_wdt" | tee /etc/modprobe.d/blacklist.conf
INTEL_WATCHDOG
INTEL_WATCHDOG
stage_ok
else
stage_fail
fi
elif [[ "${CPU}" == *"AuthenticAMD"* && "${kill_watchdog}" == "y" ]]; then
local stage_prompt="AMD Watchdog Configuration"
if arch-chroot /mnt <<-AMD_WATCHDOG > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-AMD_WATCHDOG > "${log}" 2>&1 ; then
echo "blacklist sp5100_tco" | tee /etc/modprobe.d/blacklist.conf
AMD_WATCHDOG
AMD_WATCHDOG
stage_ok
else
stage_fail
@@ -4242,14 +4265,14 @@ AMD_WATCHDOG
fi
if [[ "${oomd}" == "y" ]]; then
local stage_prompt="Systemd-oomd Service Activation"
if arch-chroot /mnt <<-OOMD > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-OOMD > "${log}" 2>&1 ; then
mkdir -p /etc/systemd/system.conf.d > "${void}" 2>&1
cat <<-OOMD_CONF > /etc/systemd/system.conf.d/00-oomd.conf
[Manager]
DefaultMemoryAccounting=yes
OOMD_CONF
OOMD_CONF
systemctl enable systemd-oomd
OOMD
OOMD
stage_ok
else
stage_fail
@@ -4257,10 +4280,10 @@ OOMD
fi
if [[ "${irqbalance}" == "y" ]]; then
local stage_prompt="Irqbalance Service Activation"
if arch-chroot /mnt <<-IRQBALANCE > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-IRQBALANCE > "${log}" 2>&1 ; then
pacman -S --noconfirm irqbalance
systemctl enable irqbalance
IRQBALANCE
IRQBALANCE
stage_ok
else
stage_fail
@@ -4268,10 +4291,10 @@ IRQBALANCE
fi
if [[ "${thermald}" == "y" ]]; then
local stage_prompt="Thermald Service Activation"
if arch-chroot /mnt <<-THERMALD > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-THERMALD > "${log}" 2>&1 ; then
pacman -S --noconfirm thermald
systemctl enable thermald
THERMALD
THERMALD
stage_ok
else
stage_fail
@@ -4279,10 +4302,10 @@ THERMALD
fi
if [[ "${rngd}" == "y" ]]; then
local stage_prompt="Rngd Service Activation"
if arch-chroot /mnt <<-RNGD > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-RNGD > "${log}" 2>&1 ; then
pacman -S --noconfirm rng-tools
systemctl enable rngd
RNGD
RNGD
stage_ok
else
stage_fail
@@ -4290,11 +4313,11 @@ RNGD
fi
if [[ "${rtkit}" == "y" ]]; then
local stage_prompt="Rtkit Service Activation"
if arch-chroot /mnt <<-RTKIT > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-RTKIT > "${log}" 2>&1 ; then
pacman -S --noconfirm realtime-privileges rtkit
systemctl enable rtkit-daemon
usermod -aG realtime ${USERNAME}
RTKIT
RTKIT
stage_ok
else
stage_fail
@@ -4303,20 +4326,20 @@ RTKIT
if [[ "${tlp}" == "y" ]]; then
local stage_prompt="Power-profiles-daemon Removal"
if [[ -e usr/lib/power-profiles-daemon ]]; then
if arch-chroot /mnt <<-PPD > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-PPD > "${log}" 2>&1 ; then
pacman -Rns --noconfirm power-profiles-daemon
PPD
PPD
stage_ok
else
stage_fail
fi
fi
local stage_prompt="Tlp Service Activation"
if arch-chroot /mnt <<-TLP > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-TLP > "${log}" 2>&1 ; then
pacman -S --noconfirm tlp
systemctl enable tlp
systemctl mask systemd-rfkill.service systemd-rfkill.socket
TLP
TLP
stage_ok
else
stage_fail
@@ -4324,11 +4347,11 @@ TLP
fi
if [[ "${printer}" == "y" ]]; then
local stage_prompt="Print & Scan Services Activation"
if arch-chroot /mnt <<-PRINT_CONF > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-PRINT_CONF > "${log}" 2>&1 ; then
systemctl enable avahi-daemon.socket cups.socket cups-browsed ipp-usb
sed -i 's|^hosts.*|hosts: mymachines mdns_minimal resolve [!UNAVAIL=return] files myhostname dns|g' /etc/nsswitch.conf
sed -i 's/ interface = [^ ]*/ interface = all/g' /etc/ipp-usb/ipp-usb.conf
PRINT_CONF
PRINT_CONF
stage_ok
else
stage_fail
@@ -4340,9 +4363,9 @@ foreign() {
if [[ -z "${nvidia_aur}" ]]; then
if [[ "${dev}" != "y" ]]; then
local stage_prompt="Base-devel Package Installation"
if arch-chroot /mnt <<-BASE_DEVEL > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-BASE_DEVEL > "${log}" 2>&1 ; then
pacman -S --noconfirm base-devel
BASE_DEVEL
BASE_DEVEL
stage_ok
else
stage_fail
@@ -4350,9 +4373,9 @@ BASE_DEVEL
fi
if [[ "${desktop}" =~ ^(11|12)$ ]]; then
local stage_prompt="Git Package Installation"
if arch-chroot /mnt <<-GIT > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GIT > "${log}" 2>&1 ; then
pacman -S --noconfirm git
GIT
GIT
stage_ok
else
stage_fail
@@ -4360,11 +4383,11 @@ GIT
fi
fi
local stage_prompt="${web_name} Package Installation"
if arch-chroot /mnt <<-AUR_WEB_PKGS > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-AUR_WEB_PKGS > "${log}" 2>&1 ; then
sed -i 's|if (( EUID == 0 )); then|if (( EUID != 0 )); then|g' /usr/bin/makepkg
git clone --branch ${web_aur} --single-branch https://github.com/archlinux/aur.git ${web_aur} && cd ${web_aur} && makepkg -s --noconfirm && sudo pacman -U --noconfirm *x86_64.pkg.tar.zst && cd .. && rm -rf ${web_aur}
sed -i 's|if (( EUID != 0 )); then|if (( EUID == 0 )); then|g' /usr/bin/makepkg
AUR_WEB_PKGS
AUR_WEB_PKGS
stage_ok
else
stage_fail
@@ -4374,14 +4397,14 @@ AUR_WEB_PKGS
optimizations() {
if [[ "${sys_optm}" == "y" ]]; then
local stage_prompt="General System Optimizations"
if arch-chroot /mnt <<-SYS_OPTM > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-SYS_OPTM > "${log}" 2>&1 ; then
pacman -S --noconfirm ccache ntfs-3g pbzip2 pigz
sed -i 's/^#Color/Color\nILoveCandy/' /etc/pacman.conf
update-pciids
cat <<-MKINITCPIO >> /etc/mkinitcpio.conf.d/mkinitcpiod.conf
COMPRESSION="zstd"
COMPRESSION_OPTIONS=(-c -T$(nproc) --auto-threads=logical -)
MKINITCPIO
MKINITCPIO
mkinitcpio -P
cat <<-MAKEPKG > /etc/makepkg.conf.d/makepkgd.conf
#!/hint/bash
@@ -4395,7 +4418,7 @@ MKINITCPIO
COMPRESSGZ=(pigz -c -f -n)
COMPRESSBZ2=(pbzip2 -c -f)
COMPRESSZST=(zstd -c -T0 --auto-threads=logical -)
MAKEPKG
MAKEPKG
cat <<-IO_SCHED > /etc/udev/rules.d/60-ioschedulers.rules
# HDD
ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
@@ -4403,7 +4426,7 @@ MAKEPKG
ACTION=="add|change", KERNEL=="sd[a-z]*|mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq"
# NVMe SSD
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
IO_SCHED
IO_SCHED
cat <<-SYSCTL > /etc/sysctl.d/99-sysctld.conf
net.core.netdev_max_backlog = 16384
net.ipv4.tcp_fastopen = 3
@@ -4418,7 +4441,7 @@ IO_SCHED
vm.mmap_min_addr = 65536
kernel.printk = 0 0 0 0
${perf_stream}
SYSCTL
SYSCTL
cat <<-POLKIT > /etc/polkit-1/rules.d/99-udisks2.rules
// Original rules: https://github.com/coldfix/udiskie/wiki/Permissions
// Changes: Added org.freedesktop.udisks2.filesystem-mount-system, as this is used by Dolphin.
@@ -4449,18 +4472,18 @@ SYSCTL
return permission[action.id];
}
});
POLKIT
POLKIT
mkdir -p /etc/systemd/journald.conf.d > ${void} 2>&1
cat <<-JOURNAL > /etc/systemd/journald.conf.d/00-journald.conf
[Journal]
SystemMaxUse=100M
JOURNAL
JOURNAL
mkdir -p /etc/systemd/user.conf.d > ${void} 2>&1
cat <<-TIMEOUT > /etc/systemd/user.conf.d/00-timeout.conf
[Manager]
DefaultTimeoutStopSec=5s
DefaultTimeoutAbortSec=5s
TIMEOUT
TIMEOUT
sed -i \
-e '/^# set linenumbers/s/^#//' \
-e '/^# set minibar/s/^#//' \
@@ -4471,24 +4494,24 @@ TIMEOUT
Defaults pwfeedback
Defaults editor=/usr/bin/nano
%wheel ALL=(ALL) ALL
SUDOERS
SUDOERS
visudo -c /etc/sudoers.d/sudoersd
SYS_OPTM
SYS_OPTM
stage_ok
else
stage_fail
fi
if [[ -d /mnt/etc/udisks2 ]]; then
local stage_prompt="Udisks2 Mount Options"
if arch-chroot /mnt <<-UDISKS2 > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-UDISKS2 > "${log}" 2>&1 ; then
cat <<-UDISKS_CONF > /etc/udisks2/mount_options.conf
[defaults]
ntfs_drivers=ntfs3,ntfs
ntfs:ntfs3_defaults=uid=*,gid=*,windows_names
ntfs:ntfs_defaults=uid=*,gid=*,windows_names
exfat_defaults=uid=*,gid=*,errors=remount-ro
UDISKS_CONF
UDISKS2
UDISKS_CONF
UDISKS2
stage_ok
else
stage_fail
@@ -4496,13 +4519,13 @@ UDISKS2
fi
if [[ -n "${REGDOM}" ]]; then
local stage_prompt="Wpa_Supplicant Configuration"
if arch-chroot /mnt <<-WPA > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-WPA > "${log}" 2>&1 ; then
cat <<-SUPPLICANT > /etc/wpa_supplicant/wpa_supplicant.conf
country=${REGDOM}
wps_cred_add_sae=1
pmf=2
SUPPLICANT
WPA
SUPPLICANT
WPA
stage_ok
else
stage_fail
@@ -4512,66 +4535,65 @@ WPA
}
view_optm() {
if [[ "${sys_optm}" == "v" ]]; then
typeset -f optimizations |grep -E 'pacman|/pacman.conf|update-pciids|usermod|systemctl|/etc|/mkinitcpio.conf.d|/makepkg.conf.d|/sysctl.d|/polkit-1/rules.d|/systemd/journald.conf.d|/systemd/user.conf.d|/nanorc|/modules-load.d|/sudoers.d|/udisks2|/wpa_supplicant|/udev/rules.d' | less
typeset -f optimizations | grep -E 'pacman|/pacman.conf|update-pciids|usermod|systemctl|/etc|/mkinitcpio.conf.d|/makepkg.conf.d|/sysctl.d|/polkit-1/rules.d|/systemd/journald.conf.d|/systemd/user.conf.d|/nanorc|/modules-load.d|/sudoers.d|/udisks2|/wpa_supplicant|/udev/rules.d' | less
fi
}
secboot_sign() {
if [[ "${sb_sign}" == "y" ]]; then
local stage_prompt="Secure-Boot Signing"
if arch-chroot /mnt <<-SECSIGN_MAIN > "${void}" 2>&1 2> "${log}" ; then
pacman -S --noconfirm sbctl
local stage_prompt="Secure Boot Signing"
if arch-chroot /mnt <<-SECSIGN_MAIN > "${log}" 2>&1 ; then
sbctl create-keys
sbctl enroll-keys -m
sbctl sign -s /boot/vmlinuz-${kernel}
SECSIGN_MAIN
SECSIGN_MAIN
:
else
stage_fail
fi
if [[ "${bootloader}" == "1" && "${uki}" == "y" ]]; then
if arch-chroot /mnt <<-SDBOOT_SECSIGN > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-SDBOOT_SECSIGN > "${log}" 2>&1 ; then
sbctl sign -s ${btldr_esp_mount}/EFI/BOOT/${efiname}.EFI
sbctl sign -s ${btldr_esp_mount}/EFI/Linux/arch-${kernel}.efi
sbctl sign -s ${btldr_esp_mount}/EFI/systemd/systemd-bootx${bitness}.efi
sbctl sign -s -o /usr/lib/systemd/boot/efi/systemd-bootx${bitness}.efi.signed /usr/lib/systemd/boot/efi/systemd-bootx${bitness}.efi
SDBOOT_SECSIGN
SDBOOT_SECSIGN
stage_ok
else
stage_fail
fi
if [[ "${setrescue}" == "y" ]]; then
local stage_prompt="Rescue Entry Secure-Boot Signing"
if arch-chroot /mnt <<-SDBOOT_RESCUE_SECSIGN > "${void}" 2>&1 2> "${log}" ; then
local stage_prompt="Rescue Entry Secure Boot Signing"
if arch-chroot /mnt <<-SDBOOT_RESCUE_SECSIGN > "${log}" 2>&1 ; then
sbctl sign -s ${btldr_esp_mount}/EFI/Linux/rescue.efi
SDBOOT_RESCUE_SECSIGN
SDBOOT_RESCUE_SECSIGN
stage_ok
else
stage_fail
fi
fi
elif [[ "${bootloader}" == "1" && "${uki}" == "n" ]]; then
if arch-chroot /mnt <<-SD_XBOOTLDR_SECSIGN > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-SD_XBOOTLDR_SECSIGN > "${log}" 2>&1 ; then
sbctl sign -s ${btldr_esp_mount}/EFI/BOOT/${efiname}.EFI
sbctl sign -s ${btldr_esp_mount}/EFI/systemd/systemd-bootx${bitness}.efi
sbctl sign -s -o /usr/lib/systemd/boot/efi/systemd-bootx${bitness}.efi.signed /usr/lib/systemd/boot/efi/systemd-bootx${bitness}.efi
SD_XBOOTLDR_SECSIGN
SD_XBOOTLDR_SECSIGN
stage_ok
else
stage_fail
fi
elif [[ "${bootloader}" == "2" ]]; then
if [[ "${path}" == "1" ]]; then
if arch-chroot /mnt <<-GRUB_SECSIGN > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GRUB_SECSIGN > "${log}" 2>&1 ; then
sbctl sign -s ${btldr_esp_mount}/EFI/GRUB/grubx${bitness}.efi
GRUB_SECSIGN
GRUB_SECSIGN
stage_ok
else
stage_fail
fi
elif [[ "${path}" == "2" ]]; then
if arch-chroot /mnt <<-GRUB_FALLBACK_SECSIGN > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GRUB_FALLBACK_SECSIGN > "${log}" 2>&1 ; then
sbctl sign -s ${btldr_esp_mount}/EFI/BOOT/${efiname}.EFI
GRUB_FALLBACK_SECSIGN
GRUB_FALLBACK_SECSIGN
stage_ok
else
stage_fail
@@ -4580,6 +4602,32 @@ GRUB_FALLBACK_SECSIGN
fi
fi
}
uki_hook() {
local stage_prompt="UKI Automation"
if [[ "${uki_use}" == "y" ]]; then
if arch-chroot /mnt <<-'UKIHOOK' > "${log}" 2>&1 ; then
mkdir -p /etc/pacman.d/hooks
cat > "/etc/pacman.d/hooks/uki.hook" <<'UKI_HOOK'
[Trigger]
Type = Package
Operation = Install
Target = linux
Target = linux-lts
Target = linux-hardened
Target = linux-zen
[Action]
Description = Creating UKIs...
When = PostTransaction
Exec = /usr/bin/bash -c 'for p in /etc/mkinitcpio.d/*.preset; do k=$(basename "$p" .preset); case "$k" in linux|linux-lts|linux-hardened|linux-zen) sed -i -e "s|^#ALL_config=.*|ALL_config=\"/etc/mkinitcpio.conf.d/mkinitcpiod.conf\"|" -e "s|^default_image=|#default_image=|" -e "s|^#default_uki=.*|default_uki=\"/efi/EFI/Linux/arch-${k}.efi\"|" -e "s|^#default_options=.*|default_options=\"--cmdline /etc/cmdline.d/cmdlined.conf\"|" "$p";; esac; done; /usr/bin/mkinitcpio -P'
UKI_HOOK
UKIHOOK
stage_ok
else
stage_fail
fi
fi
}
set_vars() {
if [[ "${multibooting}" == "y" && "${xbootloader}" == "yes" ]]; then
uki="n"
@@ -4671,36 +4719,36 @@ chroot_conf() {
if [[ -f /mnt/etc/lightdm/lightdm.conf ]]; then
if [[ "${desktop}" =~ ^(5|8|10)$ ]]; then
local stage_prompt="GTK Greeter Configuration"
if arch-chroot /mnt <<-GTK > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-GTK > "${log}" 2>&1 ; then
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-gtk-greeter|g' /etc/lightdm/lightdm.conf
GTK
GTK
stage_ok
else
stage_fail
fi
elif [[ "${desktop}" == "6" ]]; then
local stage_prompt="Slick Greeter Configuration"
if arch-chroot /mnt <<-SLICK > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-SLICK > "${log}" 2>&1 ; then
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-slick-greeter|g' /etc/lightdm/lightdm.conf
SLICK
SLICK
stage_ok
else
stage_fail
fi
elif [[ "${desktop}" == "7" ]]; then
local stage_prompt="Deepin Greeter Configuration"
if arch-chroot /mnt <<-DEEPIN > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-DEEPIN > "${log}" 2>&1 ; then
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-deepin-greeter|g' /etc/lightdm/lightdm.conf
DEEPIN
DEEPIN
stage_ok
else
stage_fail
fi
elif [[ "${desktop}" == "14" ]]; then
local stage_prompt="Pantheon Greeter Configuration"
if arch-chroot /mnt <<-PANTHEON > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-PANTHEON > "${log}" 2>&1 ; then
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=io.elementary.greeter|g' /etc/lightdm/lightdm.conf
PANTHEON
PANTHEON
stage_ok
else
stage_fail
@@ -4709,9 +4757,9 @@ PANTHEON
fi
if [[ "${vendor}" != "Virtual Machine" && "${desktop}" != "11" ]]; then
local stage_prompt="Bluetooth Service Activation"
if arch-chroot /mnt <<-BLUETOOTH > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-BLUETOOTH > "${log}" 2>&1 ; then
systemctl enable bluetooth
BLUETOOTH
BLUETOOTH
stage_ok
else
stage_fail
@@ -4719,9 +4767,9 @@ BLUETOOTH
fi
if [[ -n "${displaymanager}" ]]; then
local stage_prompt="Display Manager Service Activation"
if arch-chroot /mnt <<-DM > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-DM > "${log}" 2>&1 ; then
systemctl enable ${displaymanager}
DM
DM
stage_ok
else
stage_fail
@@ -4729,9 +4777,9 @@ DM
fi
if [[ "${desktop}" != "12" ]]; then
local stage_prompt="Network Manager Service Activation"
if arch-chroot /mnt <<-NETWORK > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-NETWORK > "${log}" 2>&1 ; then
systemctl enable NetworkManager
NETWORK
NETWORK
stage_ok
else
stage_fail
@@ -4744,9 +4792,9 @@ NETWORK
main_chroot
if [[ -n "${customservices}" ]]; then
local stage_prompt="Custom Service(s) Activation"
if arch-chroot /mnt <<-CUSTOM_SRVC > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-CUSTOM_SRVC > "${log}" 2>&1 ; then
systemctl enable ${customservices}
CUSTOM_SRVC
CUSTOM_SRVC
stage_ok
else
stage_fail
@@ -4763,6 +4811,7 @@ CUSTOM_SRVC
foreign
optimizations
secboot_sign
uki_hook
completion
installation="ok"
umount -R /mnt
@@ -4793,7 +4842,7 @@ CUSTOM_SRVC
tty="$(tty)"
trg=""
disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)"
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" greeter="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" encr_home_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" sys_optm="" set_ext_opt="" ask_param="" desk_setup="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" show_extopts="" gptslct="" gptok="" gptabort="" nvidiaprop="" nowarning="" efiname="" path="" hometype="" homeform="" LuksParts="" nvidia_aur="" web_aur_url="" session="" alt_session="" session_support="" alt_session_pack="" revision="")
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" greeter="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" encr_home_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" sys_optm="" set_ext_opt="" ask_param="" desk_setup="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" show_extopts="" gptslct="" gptok="" gptabort="" nvidiaprop="" nowarning="" efiname="" path="" hometype="" homeform="" LuksParts="" nvidia_aur="" web_aur_url="" session="" alt_session="" session_support="" alt_session_pack="" revision="" uki_use="" p="" k="")
export "${vars[@]}"
validpkgs=()
clear