mirror of
https://gitlab.com/prism7/archery.git
synced 2025-02-15 08:29:17 +01:00
Add: Now, a mandatory reboot will take place automatically after a successful LUKS encrypted installation, to prevent re-running the installer in an environment where the kernel has not been/cannot be informed about the recent changes.
Change: A few warning prompts have been edited/added for enhanced clarity. Add: Now, an 'error_log.txt' file will be created if an error occurs that forces the installation to abort. This file will be placed at the same directory that 'Amelia.sh' resides, to be used for troubleshooting.
This commit is contained in:
parent
f60955831c
commit
8e6c6402cd
1 changed files with 76 additions and 60 deletions
136
Amelia.sh
136
Amelia.sh
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Amelia Installer
|
||||
# https://gitlab.com/prism7/archery
|
||||
# Version: 8.2.0
|
||||
# Version: 8.2.1
|
||||
|
||||
set -euo pipefail
|
||||
###################################################################################################
|
||||
|
@ -130,6 +130,20 @@ err_abort() {
|
|||
------------------------"
|
||||
failure
|
||||
}
|
||||
reboot() {
|
||||
if [[ "${luks_encrypt}" == "ok" ]]; then
|
||||
sleep 0.2
|
||||
RED "
|
||||
-------------------------------------------------------------------
|
||||
### ${yellow}The system will now ${nc}reboot ${yellow}for all changes to take effect ${red}###
|
||||
-------------------------------------------------------------------
|
||||
|
||||
|
||||
"
|
||||
sleep 5
|
||||
systemctl reboot
|
||||
fi
|
||||
}
|
||||
line2() {
|
||||
printf '\n\n'
|
||||
}
|
||||
|
@ -970,6 +984,9 @@ Enter a number: "
|
|||
kernel="linux-lts"
|
||||
kernelname="Linux LTS" ;;
|
||||
3)
|
||||
CYAN "
|
||||
(*) ${nc}System Hibernation is ${yellowl}NOT SUPPORTED ${nc}by kernel
|
||||
"
|
||||
kernel="linux-hardened"
|
||||
kernelname="Linux Hardened" ;;
|
||||
4)
|
||||
|
@ -993,12 +1010,6 @@ Enter a number: "
|
|||
|
||||
### The ${kernelname} kernel has been selected
|
||||
"
|
||||
if [[ "${kernelnmbr}" == "3" ]]; then
|
||||
|
||||
CYAN "
|
||||
(*) ${nc}System Hibernation is ${yellowl}NOT SUPPORTED ${nc}by kernel
|
||||
"
|
||||
fi
|
||||
ok
|
||||
if [[ "${vga_slct}" == "yes" ]]; then
|
||||
local stage_prompt="Graphics Setup"
|
||||
|
@ -1333,6 +1344,9 @@ Enter a number: "
|
|||
"
|
||||
until set_swapsize; do : ; done ;;
|
||||
3)
|
||||
CYAN "
|
||||
(*) ${nc}Hibernating to Swap on Zram is ${yellowl}NOT SUPPORTED
|
||||
"
|
||||
zram="zram-generator"
|
||||
YELLOW "
|
||||
|
||||
|
@ -2684,7 +2698,7 @@ Enter a Custom Percentage number ${nc}e.g. 30 ${bwhite}(empty to skip)${blue}: "
|
|||
sleep 0.2
|
||||
RED "
|
||||
-----------------------------------------------------
|
||||
### ${yellow}WARNING: No space left for other partitions ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}No space left for other partitions ${red}###
|
||||
-----------------------------------------------------"
|
||||
reload
|
||||
return 1
|
||||
|
@ -2986,7 +3000,7 @@ ${magenta}###${nc}--------------------------------------${magenta}[ ${bwhite}San
|
|||
sleep 0.2
|
||||
RED "
|
||||
----------------------------------------------------------------------------
|
||||
### ${yellow}WARNING: Multiple Linux x86-64 /Root Partitions have been detected ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}Multiple Linux x86-64 /Root Partitions have been detected ${red}###
|
||||
----------------------------------------------------------------------------
|
||||
"
|
||||
sleep 0.2
|
||||
|
@ -3038,7 +3052,7 @@ ${multi_root}
|
|||
sleep 0.2
|
||||
RED "
|
||||
--------------------------------------------------------------------
|
||||
### ${yellow}WARNING: Multiple EFI System Partitions have been detected ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}Multiple EFI System Partitions have been detected ${red}###
|
||||
--------------------------------------------------------------------
|
||||
"
|
||||
sleep 0.2
|
||||
|
@ -3095,7 +3109,7 @@ ${multi_esp}
|
|||
sleep 0.2
|
||||
RED "
|
||||
-----------------------------------------------------------------------------
|
||||
### ${yellow}WARNING: Multiple Linux Extended Boot Partitions have been detected ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}Multiple Linux Extended Boot Partitions have been detected ${red}###
|
||||
-----------------------------------------------------------------------------
|
||||
"
|
||||
sleep 0.2
|
||||
|
@ -3146,7 +3160,7 @@ ${multi_xboot}
|
|||
sleep 0.2
|
||||
RED "
|
||||
---------------------------------------------------------------------
|
||||
### ${yellow}WARNING: Multiple Linux /Home Partitions have been detected ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}Multiple Linux /Home Partitions have been detected ${red}###
|
||||
---------------------------------------------------------------------
|
||||
"
|
||||
sleep 0.2
|
||||
|
@ -3197,7 +3211,7 @@ ${multi_home}
|
|||
sleep 0.2
|
||||
RED "
|
||||
---------------------------------------------------------------------
|
||||
### ${yellow}WARNING: Multiple Linux /Swap Partitions have been detected ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}Multiple Linux /Swap Partitions have been detected ${red}###
|
||||
---------------------------------------------------------------------
|
||||
"
|
||||
sleep 0.2
|
||||
|
@ -3252,9 +3266,9 @@ ${multi_swap}
|
|||
rootprt="ok"
|
||||
sleep 0.2
|
||||
RED "
|
||||
-----------------------------------------------
|
||||
### ${yellow}WARNING: /Root's size is not adequate ${red}###
|
||||
-----------------------------------------------"
|
||||
-----------------------------------------------------
|
||||
### ${yellowl}WARNING: ${nc}${yellow}/Root's size might not be adequate ${red}###
|
||||
-----------------------------------------------------"
|
||||
sleep 0.2
|
||||
RED "
|
||||
------------------------------------------------------------------------
|
||||
|
@ -3375,7 +3389,7 @@ ${multi_swap}
|
|||
sleep 0.2
|
||||
RED "
|
||||
---------------------------------------------
|
||||
### ${yellow}WARNING: ESP's size is not adequate ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}ESP's size is not adequate ${red}###
|
||||
---------------------------------------------"
|
||||
sleep 0.2
|
||||
RED "
|
||||
|
@ -3389,7 +3403,7 @@ ${multi_swap}
|
|||
sleep 0.2
|
||||
RED "
|
||||
---------------------------------------------
|
||||
### ${yellow}WARNING: ESP's size is not adequate ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}ESP's size is not adequate ${red}###
|
||||
---------------------------------------------"
|
||||
fi
|
||||
elif [[ "${bootloader}" == "2" ]]; then
|
||||
|
@ -3399,7 +3413,7 @@ ${multi_swap}
|
|||
sleep 0.2
|
||||
RED "
|
||||
---------------------------------------------
|
||||
### ${yellow}WARNING: ESP's size is not adequate ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}ESP's size is not adequate ${red}###
|
||||
---------------------------------------------"
|
||||
elif [[ "${espmnt}" == "1" ]]; then
|
||||
espprt="ok"
|
||||
|
@ -3661,6 +3675,7 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Encry
|
|||
if [[ "${encrypt}" == "no" ]]; then
|
||||
skip
|
||||
ok
|
||||
line2
|
||||
return 0
|
||||
elif [[ "${encrypt}" == "yes" ]]; then
|
||||
if [[ "${bootloader}" == "2" && "${espmnt}" == "1" ]]; then
|
||||
|
@ -3929,7 +3944,6 @@ ${magenta}###${nc}----------------------------------${magenta}[ ${bwhite}Swap P
|
|||
set_mode() {
|
||||
|
||||
if [[ "${rootcount}" -gt "1" || "${espcount}" -gt "1" || "${xbootcount}" -gt "1" || "${homecount}" -gt "1" || "${swapcount}" -gt "1" ]]; then
|
||||
line2
|
||||
until auto_mode; do : ; done
|
||||
sleep 0.2
|
||||
NC "
|
||||
|
@ -4264,7 +4278,7 @@ Enter a partition number ${bwhite}(empty to skip and proceed)${blue}: "
|
|||
fi
|
||||
RED "
|
||||
---------------------------------------------------
|
||||
### ${yellow}WARNING: PARTITION HAS NOT BEEN FORMATTED ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}PARTITION HAS NOT BEEN FORMATTED ${red}###
|
||||
---------------------------------------------------"
|
||||
sleep 2
|
||||
skip
|
||||
|
@ -4317,7 +4331,7 @@ Enter a partition number ${bwhite}(empty to skip and proceed)${blue}: "
|
|||
fi
|
||||
RED "
|
||||
---------------------------------------------------
|
||||
### ${yellow}WARNING: PARTITION HAS NOT BEEN FORMATTED ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}PARTITION HAS NOT BEEN FORMATTED ${red}###
|
||||
---------------------------------------------------"
|
||||
sleep 2
|
||||
skip
|
||||
|
@ -4435,7 +4449,7 @@ Enter a name ${bwhite}(empty to skip and proceed)${blue}: "
|
|||
else
|
||||
RED "
|
||||
---------------------------------------------------
|
||||
### ${yellow}WARNING: PARTITION HAS NOT BEEN FORMATTED ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}PARTITION HAS NOT BEEN FORMATTED ${red}###
|
||||
---------------------------------------------------"
|
||||
sleep 2
|
||||
skip
|
||||
|
@ -4566,7 +4580,7 @@ Enter a name ${bwhite}(empty to skip and proceed)${blue}: "
|
|||
else
|
||||
RED "
|
||||
---------------------------------------------------
|
||||
### ${yellow}WARNING: PARTITION HAS NOT BEEN FORMATTED ${red}###
|
||||
### ${yellowl}WARNING: ${nc}${yellow}PARTITION HAS NOT BEEN FORMATTED ${red}###
|
||||
---------------------------------------------------"
|
||||
skip
|
||||
return 0
|
||||
|
@ -5118,6 +5132,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}LUKS
|
|||
sleep 0.2
|
||||
NC "
|
||||
==> [${green}Encryption OK${nc}]"
|
||||
luks_encrypt="ok"
|
||||
sleep 0.2
|
||||
NC "
|
||||
|
||||
|
@ -5410,8 +5425,8 @@ swapfile() {
|
|||
|
||||
${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Swapfile Setup${nc} ${magenta}]${nc}-------------------------------------${magenta}###
|
||||
"
|
||||
if arch-chroot /mnt <<-SWAPFILE > /dev/null 2>&1 ; then
|
||||
mkswap -U clear --size ${swapsize}G --file /swapfile > /dev/null 2>&1 || exit
|
||||
if arch-chroot /mnt <<-SWAPFILE > /dev/null 2>&1 2> error_log.txt ; then
|
||||
mkswap -U clear --size ${swapsize}G --file /swapfile || exit
|
||||
SWAPFILE
|
||||
cat >> /mnt/etc/fstab <<-FSTAB || err_abort
|
||||
/swapfile none swap defaults 0 0
|
||||
|
@ -5431,8 +5446,8 @@ swapfile_btrfs() {
|
|||
|
||||
${magenta}###${nc}----------------------------------${magenta}[ ${bwhite}Btrfs Swapfile Setup${nc} ${magenta}]${nc}----------------------------------${magenta}###
|
||||
"
|
||||
if arch-chroot /mnt <<-SWAPFILE > /dev/null 2>&1 ; then
|
||||
btrfs filesystem mkswapfile --size ${swapsize}g --uuid clear /swap/swapfile > /dev/null 2>&1 || exit
|
||||
if arch-chroot /mnt <<-SWAPFILE > /dev/null 2>&1 2> error_log.txt ; then
|
||||
btrfs filesystem mkswapfile --size ${swapsize}g --uuid clear /swap/swapfile || exit
|
||||
SWAPFILE
|
||||
cat >> /mnt/etc/fstab <<-FSTAB || err_abort
|
||||
/swap/swapfile none swap defaults 0 0
|
||||
|
@ -5462,7 +5477,7 @@ ${magenta}###${nc}--------------------------${magenta}[ ${bwhite}Setting Up Wire
|
|||
main_chroot() {
|
||||
|
||||
stage_prompt="Base-System Configuration"
|
||||
if arch-chroot /mnt <<-CONF > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-CONF > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i "/^#${SETLOCALE}/s/^#//" /etc/locale.gen || exit
|
||||
locale-gen || exit
|
||||
echo LANG=${SETLOCALE} > /etc/locale.conf || exit
|
||||
|
@ -5498,7 +5513,7 @@ btldrcfg() {
|
|||
if [[ "${bootloader}" == "1" ]]; then
|
||||
local stage_prompt="Systemd-boot Configuration"
|
||||
if [[ "${xbootloader}" == "no" ]]; then
|
||||
if arch-chroot /mnt <<-BOOTCTL > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-BOOTCTL > /dev/null 2>&1 2> error_log.txt ; then
|
||||
bootctl install || exit
|
||||
systemctl enable systemd-boot-update || exit
|
||||
BOOTCTL
|
||||
|
@ -5507,7 +5522,7 @@ BOOTCTL
|
|||
stage_fail
|
||||
fi
|
||||
elif [[ "${xbootloader}" == "yes" ]]; then
|
||||
if arch-chroot /mnt <<-XBOOTCTL > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-XBOOTCTL > /dev/null 2>&1 2> error_log.txt ; then
|
||||
bootctl --esp-path=/efi --boot-path=/boot install || exit
|
||||
systemctl enable systemd-boot-update || exit
|
||||
XBOOTCTL
|
||||
|
@ -5518,8 +5533,8 @@ XBOOTCTL
|
|||
fi
|
||||
elif [[ "${bootloader}" == "2" ]]; then
|
||||
local stage_prompt="Grub Configuration"
|
||||
if arch-chroot /mnt <<-GRUB > /dev/null 2>&1 ; then
|
||||
cp /etc/default/grub /etc/default/grub.bak
|
||||
if arch-chroot /mnt <<-GRUB > /dev/null 2>&1 2> error_log.txt ; then
|
||||
cp /etc/default/grub /etc/default/grub.bak || exit
|
||||
cat <<-CFG > /etc/default/grub || exit
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_TIMEOUT=5
|
||||
|
@ -5543,7 +5558,7 @@ GRUB
|
|||
|
||||
local stage_prompt="Grub Installation"
|
||||
if [[ "${sb_sign}" == "y" ]]; then
|
||||
if arch-chroot /mnt <<-SBGRUBINST > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-SBGRUBINST > /dev/null 2>&1 2> error_log.txt ; then
|
||||
grub-install --target=${uefimode} --efi-directory=${btldr_esp_mount} --bootloader-id=GRUB --modules="tpm" --disable-shim-lock --recheck || exit
|
||||
sed -i 's/SecureBoot/SecureB00t/' ${btldr_esp_mount}/EFI/GRUB/grubx64.efi || exit
|
||||
grub-mkconfig -o /boot/grub/grub.cfg || exit
|
||||
|
@ -5553,7 +5568,7 @@ SBGRUBINST
|
|||
stage_fail
|
||||
fi
|
||||
elif [[ "${sb_sign}" == "n" ]]; then
|
||||
if arch-chroot /mnt <<-GRUBINST > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-GRUBINST > /dev/null 2>&1 2> error_log.txt ; then
|
||||
grub-install --target=${uefimode} --efi-directory=${btldr_esp_mount} --bootloader-id=GRUB --recheck || exit
|
||||
grub-mkconfig -o /boot/grub/grub.cfg || exit
|
||||
GRUBINST
|
||||
|
@ -5565,7 +5580,7 @@ GRUBINST
|
|||
|
||||
if [[ "${fs}" == "2" ]]; then
|
||||
local stage_prompt="Grub-Btrfsd Service Activation"
|
||||
if arch-chroot /mnt <<-GRUB_BTRFSD > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-GRUB_BTRFSD > /dev/null 2>&1 2> error_log.txt ; then
|
||||
systemctl enable grub-btrfsd || exit
|
||||
GRUB_BTRFSD
|
||||
stage_ok
|
||||
|
@ -5576,7 +5591,7 @@ GRUB_BTRFSD
|
|||
|
||||
if [[ "${vgaconf}" == "y" && "${vendor}" == "Nvidia" ]]; then
|
||||
local stage_prompt="Grub/Nvidia Configuration"
|
||||
if arch-chroot /mnt <<-NVGRUB > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-NVGRUB > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i "/^#GRUB_TERMINAL_OUTPUT=console/s/^#//" /etc/default/grub || exit
|
||||
grub-mkconfig -o /boot/grub/grub.cfg || exit
|
||||
NVGRUB
|
||||
|
@ -5592,7 +5607,7 @@ trimcfg() {
|
|||
|
||||
if [[ -n "${trim}" ]]; then
|
||||
local stage_prompt="Trim Service Activation"
|
||||
if arch-chroot /mnt <<-TRIM > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-TRIM > /dev/null 2>&1 2> error_log.txt ; then
|
||||
systemctl enable ${trim} || exit
|
||||
TRIM
|
||||
stage_ok
|
||||
|
@ -5606,7 +5621,7 @@ vm_serv() {
|
|||
|
||||
if [[ -n "${vm_services}" ]]; then
|
||||
local stage_prompt="VM Service(s) Activation"
|
||||
if arch-chroot /mnt <<-VM > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-VM > /dev/null 2>&1 2> error_log.txt ; then
|
||||
systemctl enable ${vm_services} || exit
|
||||
VM
|
||||
stage_ok
|
||||
|
@ -5621,8 +5636,8 @@ zramcfg() {
|
|||
if [[ -n "${zram}" ]]; then
|
||||
local stage_prompt="Zram Swap Activation"
|
||||
zram_service="systemd-zram-setup@zram0.service"
|
||||
if arch-chroot /mnt <<-ZRAMCONF > /dev/null 2>&1 ; then
|
||||
mkdir -p /etc/systemd/zram-generator.conf.d
|
||||
if arch-chroot /mnt <<-ZRAMCONF > /dev/null 2>&1 2> error_log.txt ; then
|
||||
mkdir -p /etc/systemd/zram-generator.conf.d || exit
|
||||
cat <<-ZCONF > /etc/systemd/zram-generator.conf.d/zram.conf || exit
|
||||
[zram0]
|
||||
zram-size = ram / 2
|
||||
|
@ -5649,7 +5664,7 @@ nvidia_hook() {
|
|||
if [[ "${vgaconf}" == "y" && "${vendor}" == "Nvidia" ]]; then
|
||||
if [[ "${nvname}" == "nvidia-open" ]] || [[ "${nvname}" == "nvidia" ]] || [[ "${nvname}" == "nvidia-lts" ]]; then
|
||||
local stage_prompt="Nvidia Hook Creation"
|
||||
if arch-chroot /mnt <<-NVIDIAHOOK > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-NVIDIAHOOK > /dev/null 2>&1 2> error_log.txt ; then
|
||||
mkdir -p /etc/pacman.d/hooks/ || exit
|
||||
cat <<-HOOK > /etc/pacman.d/hooks/nvidia.hook || exit
|
||||
[Trigger]
|
||||
|
@ -5684,10 +5699,10 @@ mkinitcpio_preset() {
|
|||
if [[ ! -e "${esp_mount}"/EFI/Linux ]]; then
|
||||
mkdir -p "${esp_mount}"/EFI/Linux || exit
|
||||
fi
|
||||
if arch-chroot /mnt <<-UKI > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-UKI > /dev/null 2>&1 2> error_log.txt ; then
|
||||
mkdir /etc/cmdline.d || exit
|
||||
echo "rw ${boot_opts}" | tee /etc/cmdline.d/cmdlined.conf || exit
|
||||
cp /etc/mkinitcpio.d/${kernel}.preset /etc/mkinitcpio.d/${kernel}.preset.bak
|
||||
cp /etc/mkinitcpio.d/${kernel}.preset /etc/mkinitcpio.d/${kernel}.preset.bak || exit
|
||||
cat <<-MKINITPRESET > /etc/mkinitcpio.d/${kernel}.preset || exit
|
||||
ALL_kver="/boot/vmlinuz-${kernel}"
|
||||
PRESETS=('default')
|
||||
|
@ -5707,8 +5722,8 @@ UKI
|
|||
rm /mnt/boot/initramfs-"${kernel}"-fallback.img || exit
|
||||
fi
|
||||
elif [[ "${uki}" == "n" ]]; then
|
||||
if arch-chroot /mnt <<-NOUKI > /dev/null 2>&1 ; then
|
||||
cp /etc/mkinitcpio.d/${kernel}.preset /etc/mkinitcpio.d/${kernel}.preset.bak
|
||||
if arch-chroot /mnt <<-NOUKI > /dev/null 2>&1 2> error_log.txt ; then
|
||||
cp /etc/mkinitcpio.d/${kernel}.preset /etc/mkinitcpio.d/${kernel}.preset.bak || exit
|
||||
cat <<-MKINITPRESET > /etc/mkinitcpio.d/${kernel}.preset || exit
|
||||
ALL_kver="/boot/vmlinuz-${kernel}"
|
||||
PRESETS=('default' 'fallback')
|
||||
|
@ -5731,7 +5746,7 @@ secboot_sign() {
|
|||
if [[ ${sb_sign} == "y" ]]; then
|
||||
local stage_prompt="Secure-Boot Signing"
|
||||
if [[ ${bootloader} == "1" ]]; then
|
||||
if arch-chroot /mnt <<-SECSIGN > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-SECSIGN > /dev/null 2>&1 2> error_log.txt ; then
|
||||
systemctl disable systemd-boot-update || exit
|
||||
pacman -S --noconfirm sbctl || exit
|
||||
sbctl create-keys || exit
|
||||
|
@ -5747,7 +5762,7 @@ SECSIGN
|
|||
stage_fail
|
||||
fi
|
||||
elif [[ ${bootloader} == "2" ]]; then
|
||||
if arch-chroot /mnt <<-SECSIGN > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-SECSIGN > /dev/null 2>&1 2> error_log.txt ; then
|
||||
pacman -S --noconfirm sbctl || exit
|
||||
sbctl create-keys || exit
|
||||
sbctl enroll-keys -m || exit
|
||||
|
@ -5937,7 +5952,7 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Chroot &
|
|||
if [[ -f /mnt/etc/lightdm/lightdm.conf ]]; then
|
||||
if [[ "${packages}" == "7" ]]; then
|
||||
local stage_prompt="Deepin Greeter Configuration"
|
||||
if arch-chroot /mnt <<-DEEPIN > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-DEEPIN > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-deepin-greeter|g' /etc/lightdm/lightdm.conf || exit
|
||||
DEEPIN
|
||||
stage_ok
|
||||
|
@ -5946,7 +5961,7 @@ DEEPIN
|
|||
fi
|
||||
elif [[ "${packages}" == "5" || "${packages}" == "8" || "${packages}" == "10" ]]; then
|
||||
local stage_prompt="GTK Greeter Configuration"
|
||||
if arch-chroot /mnt <<-GTK > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-GTK > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-gtk-greeter|g' /etc/lightdm/lightdm.conf || exit
|
||||
GTK
|
||||
stage_ok
|
||||
|
@ -5955,7 +5970,7 @@ GTK
|
|||
fi
|
||||
elif [[ "${packages}" == "6" ]]; then
|
||||
local stage_prompt="Slick Greeter Configuration"
|
||||
if arch-chroot /mnt <<-SLICK > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-SLICK > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-slick-greeter|g' /etc/lightdm/lightdm.conf || exit
|
||||
SLICK
|
||||
stage_ok
|
||||
|
@ -5967,7 +5982,7 @@ SLICK
|
|||
|
||||
if [[ -n "${bluetooth}" ]]; then
|
||||
local stage_prompt="Bluetooth Service Activation"
|
||||
if arch-chroot /mnt <<-BLUETOOTH > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-BLUETOOTH > /dev/null 2>&1 2> error_log.txt ; then
|
||||
systemctl enable ${bluetooth} || exit
|
||||
BLUETOOTH
|
||||
stage_ok
|
||||
|
@ -5978,7 +5993,7 @@ BLUETOOTH
|
|||
|
||||
if [[ -n "${displaymanager}" ]]; then
|
||||
local stage_prompt="Display Manager Service Activation"
|
||||
if arch-chroot /mnt <<-DMSERVICE > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-DMSERVICE > /dev/null 2>&1 2> error_log.txt ; then
|
||||
systemctl enable ${displaymanager} || exit
|
||||
DMSERVICE
|
||||
stage_ok
|
||||
|
@ -5989,7 +6004,7 @@ DMSERVICE
|
|||
|
||||
if [[ -n "${network}" ]]; then
|
||||
local stage_prompt="Network Manager Service Activation"
|
||||
if arch-chroot /mnt <<-NETWORK > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-NETWORK > /dev/null 2>&1 2> error_log.txt ; then
|
||||
systemctl enable ${network} || exit
|
||||
NETWORK
|
||||
stage_ok
|
||||
|
@ -6016,7 +6031,7 @@ NETWORK
|
|||
if [[ -f /mnt/etc/lightdm/lightdm.conf ]]; then
|
||||
if [[ "${greeternmbr}" == "1" ]]; then
|
||||
local stage_prompt="GTK Greeter Configuration"
|
||||
if arch-chroot /mnt <<-GTK > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-GTK > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-gtk-greeter|g' /etc/lightdm/lightdm.conf || exit
|
||||
GTK
|
||||
stage_ok
|
||||
|
@ -6025,7 +6040,7 @@ GTK
|
|||
fi
|
||||
elif [[ "${greeternmbr}" == "2" ]]; then
|
||||
local stage_prompt="Slick Greeter Configuration"
|
||||
if arch-chroot /mnt <<-SLICK > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-SLICK > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-slick-greeter|g' /etc/lightdm/lightdm.conf || exit
|
||||
SLICK
|
||||
stage_ok
|
||||
|
@ -6034,7 +6049,7 @@ SLICK
|
|||
fi
|
||||
elif [[ "${greeternmbr}" == "3" ]]; then
|
||||
local stage_prompt="Deepin Greeter Configuration"
|
||||
if arch-chroot /mnt <<-DEEPIN > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-DEEPIN > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i 's|^#greeter-session=example-gtk-gnome|greeter-session=lightdm-deepin-greeter|g' /etc/lightdm/lightdm.conf || exit
|
||||
DEEPIN
|
||||
stage_ok
|
||||
|
@ -6046,7 +6061,7 @@ DEEPIN
|
|||
|
||||
if [[ -n "${customservices}" ]]; then
|
||||
local stage_prompt="Custom Service(s) Activation"
|
||||
if arch-chroot /mnt <<-CUSTOMSERV > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-CUSTOMSERV > /dev/null 2>&1 2> error_log.txt ; then
|
||||
systemctl enable ${customservices} || exit
|
||||
CUSTOMSERV
|
||||
stage_ok
|
||||
|
@ -6082,7 +6097,7 @@ CUSTOMSERV
|
|||
NRG
|
||||
fi
|
||||
|
||||
if arch-chroot /mnt <<-OPTIMIZED > /dev/null 2>&1 ; then
|
||||
if arch-chroot /mnt <<-OPTIMIZED > /dev/null 2>&1 2> error_log.txt ; then
|
||||
sed -i "/^#${SETLOCALE}/s/^#//" /etc/locale.gen || exit
|
||||
locale-gen || exit
|
||||
echo LANG=${SETLOCALE} > /etc/locale.conf || exit
|
||||
|
@ -6239,6 +6254,7 @@ OPTIMIZED
|
|||
fi
|
||||
|
||||
umount -R /mnt
|
||||
reboot
|
||||
exit
|
||||
}
|
||||
# END FUNCTIONS
|
||||
|
@ -6248,7 +6264,7 @@ OPTIMIZED
|
|||
tty="$(tty)"
|
||||
disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)"
|
||||
trg=""
|
||||
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" vgapkgs="" vgacount="" vgacard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vgaconf="" vga_conf="" vga_setup="" vendor="" vendor1="" vendor2="" vendor3="" vendor_slct="" packages="" efi_entr_del="" wrlss_rgd="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" vga_bootopts="" btrfs_bootopts="" trim="" swapmode="" homecrypt="" greeter="" revision="" greeternmbr="" cust_bootopts="" bluetooth="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" vga_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" use_manpreset="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" zram_bootopts="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" uki="" ukify="" slct_autoprt="" cng_espmnt="" sep_home="" encr_swap_bootopts="" uefimode="")
|
||||
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" vgapkgs="" vgacount="" vgacard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vgaconf="" vga_conf="" vga_setup="" vendor="" vendor1="" vendor2="" vendor3="" vendor_slct="" packages="" efi_entr_del="" wrlss_rgd="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" vga_bootopts="" btrfs_bootopts="" trim="" swapmode="" homecrypt="" greeter="" revision="" greeternmbr="" cust_bootopts="" bluetooth="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" vga_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" use_manpreset="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" zram_bootopts="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" uki="" ukify="" slct_autoprt="" cng_espmnt="" sep_home="" encr_swap_bootopts="" uefimode="" luks_encrypt="")
|
||||
export "${vars[@]}"
|
||||
clear
|
||||
first_check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue