scripts: Fix flashing without systemd-boot

Set `EFI_PATH` to `/boot/efi` as a default for systems that do not have
bootctl from systemd-boot.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford 2025-01-13 13:12:25 -07:00 committed by Tim Crawford
parent 29f1352365
commit 7c15b7dacb

View file

@ -51,7 +51,12 @@ then
fi
# Locate EFI partition mount path
EFI_PATH="$(bootctl --print-esp-path)"
EFI_PATH="${EFI_PATH:-/boot/efi}"
if command -v bootctl >/dev/null 2>&1
then
EFI_PATH="$(bootctl --print-esp-path)"
fi
if [ -z "${EFI_PATH}" ] || [ ! -d "${EFI_PATH}" ]
then
echo "EFI system partition '${EFI_PATH}' not found" >&2