Fix: missing default boot fallback directory name being empty when none exist

This commit is contained in:
natemaia 2018-12-16 22:10:52 -08:00
parent db9629d5cb
commit fda32f23e8
3 changed files with 12 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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()