mirror of
https://gitlab.com/prism7/archery.git
synced 2026-04-28 01:17:35 +02:00
Fix: Failing to create UKI(s) under circumstances has been addressed
Change: Code refinements
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Amelia installer for Archlinux
|
||||
# Version: 1.5.2
|
||||
# Version: 1.5.3
|
||||
# Source: https://gitlab.com/prism7/archery
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
@@ -715,6 +715,7 @@ ask_sign() {
|
||||
return 1
|
||||
fi
|
||||
elif [[ "${sb_sign}" == "n" ]]; then
|
||||
setrescue="n"
|
||||
skip
|
||||
else
|
||||
y_n
|
||||
@@ -3839,7 +3840,6 @@ pacstrap_system() {
|
||||
local stage_prompt="Pacstrap System"
|
||||
stage_fail
|
||||
fi
|
||||
exec </dev/console >/dev/console 2>&1
|
||||
if [[ "${fs}" == "2" ]]; then
|
||||
local prompt="Fstab"
|
||||
local stage_prompt="Fstab"
|
||||
@@ -3916,7 +3916,7 @@ main_chroot() {
|
||||
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
|
||||
echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/sudoersd
|
||||
visudo -c /etc/sudoers.d/sudoersd
|
||||
CONF
|
||||
stage_ok
|
||||
@@ -3933,8 +3933,8 @@ mkinitcpio_preset() {
|
||||
local stage_prompt="Uki + Rescue Uki Creation"
|
||||
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
|
||||
echo "rw ${boot_opts[*]}" > /etc/cmdline.d/cmdlined.conf
|
||||
echo "systemd.unit=rescue.target rw ${boot_opts[*]}" > /etc/cmdline.d/rescued.conf
|
||||
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
|
||||
@@ -3956,7 +3956,7 @@ mkinitcpio_preset() {
|
||||
local stage_prompt="Uki Creation"
|
||||
if arch-chroot /mnt <<-UKI > "${log}" 2>&1 ; then
|
||||
mkdir /etc/cmdline.d
|
||||
echo "rw ${boot_opts[*]}" | tee /etc/cmdline.d/cmdlined.conf
|
||||
echo "rw ${boot_opts[*]}" > /etc/cmdline.d/cmdlined.conf
|
||||
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
|
||||
@@ -4243,7 +4243,7 @@ var_opts() {
|
||||
if [[ "${CPU}" == *"GenuineIntel"* && "${kill_watchdog}" == "y" ]]; then
|
||||
local stage_prompt="Intel Watchdog Configuration"
|
||||
if arch-chroot /mnt <<-INTEL_WATCHDOG > "${log}" 2>&1 ; then
|
||||
echo "blacklist iTCO_wdt" | tee /etc/modprobe.d/blacklist.conf
|
||||
echo "blacklist iTCO_wdt" > /etc/modprobe.d/blacklist.conf
|
||||
INTEL_WATCHDOG
|
||||
stage_ok
|
||||
else
|
||||
@@ -4252,7 +4252,7 @@ var_opts() {
|
||||
elif [[ "${CPU}" == *"AuthenticAMD"* && "${kill_watchdog}" == "y" ]]; then
|
||||
local stage_prompt="AMD Watchdog Configuration"
|
||||
if arch-chroot /mnt <<-AMD_WATCHDOG > "${log}" 2>&1 ; then
|
||||
echo "blacklist sp5100_tco" | tee /etc/modprobe.d/blacklist.conf
|
||||
echo "blacklist sp5100_tco" > /etc/modprobe.d/blacklist.conf
|
||||
AMD_WATCHDOG
|
||||
stage_ok
|
||||
else
|
||||
@@ -4484,8 +4484,8 @@ optimizations() {
|
||||
-e '/^# set linenumbers/s/^#//' \
|
||||
-e '/^# set minibar/s/^#//' \
|
||||
-e '/^# set mouse/s/^#//' /etc/nanorc
|
||||
echo " include /usr/share/nano/*.nanorc" | tee -a /etc/nanorc
|
||||
echo tcp_bbr | tee /etc/modules-load.d/modulesd.conf
|
||||
echo " include /usr/share/nano/*.nanorc" >> /etc/nanorc
|
||||
echo tcp_bbr > /etc/modules-load.d/modulesd.conf
|
||||
cat <<-SUDOERS > /etc/sudoers.d/sudoersd
|
||||
Defaults pwfeedback
|
||||
Defaults editor=/usr/bin/nano
|
||||
|
||||
Reference in New Issue
Block a user