Fix: missing default boot fallback directory name being empty when none exist
This commit is contained in:
parent
db9629d5cb
commit
fda32f23e8
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
# immutable globals
|
||||
readonly VER="1.7.45" # Installer version
|
||||
readonly VER="1.7.46" # Installer version
|
||||
readonly DIST="ArchLabs" # Linux distributor
|
||||
readonly MNT="/mnt" # Install mountpoint
|
||||
readonly ERR="/tmp/errlog" # Built-in error log
|
||||
|
@ -233,12 +233,19 @@ uefi_boot_fallback()
|
||||
# some UEFI firmware requires a dir in the ESP with a generic bootx64.efi
|
||||
# see: https://wiki.archlinux.org/index.php/GRUB#UEFI
|
||||
|
||||
local esp="${MNT}${BMNTS[UEFI-grub]}"
|
||||
local default="boot"
|
||||
local esp="${MNT}${BMNTS[$SYS-$BOOTLDR]}"
|
||||
|
||||
local default
|
||||
default="$(find $esp/EFI/ -maxdepth 1 -mindepth 1 -name '[Bb][oO][oO][tT]' -type d)"
|
||||
default="$(basename $default)"
|
||||
|
||||
if [[ $default ]]; then
|
||||
default="${default##/*}"
|
||||
else
|
||||
default="boot"
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
|
||||
if [[ -d $esp/EFI/$default ]]; then
|
||||
rm -rfv $esp/EFI/$default/*
|
||||
else
|
||||
|
@ -370,7 +370,7 @@ select_wm_or_de()
|
||||
fi
|
||||
|
||||
# add packages to the main package list
|
||||
declare -g PACKAGES="$WM_PACKAGES"
|
||||
PACKAGES="$WM_PACKAGES"
|
||||
}
|
||||
|
||||
select_login()
|
||||
|
Reference in New Issue
Block a user