From 7c15b7dacba83ccc1dd944bec1fef2e1455ab274 Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Mon, 13 Jan 2025 13:12:25 -0700 Subject: [PATCH] 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 --- scripts/flash.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/flash.sh b/scripts/flash.sh index d6af88a..09f8e39 100755 --- a/scripts/flash.sh +++ b/scripts/flash.sh @@ -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