Skip to content

Commit 7c15b7d

Browse files
committed
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 <[email protected]>
1 parent 29f1352 commit 7c15b7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/flash.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ then
5151
fi
5252

5353
# Locate EFI partition mount path
54-
EFI_PATH="$(bootctl --print-esp-path)"
54+
EFI_PATH="${EFI_PATH:-/boot/efi}"
55+
if command -v bootctl >/dev/null 2>&1
56+
then
57+
EFI_PATH="$(bootctl --print-esp-path)"
58+
fi
59+
5560
if [ -z "${EFI_PATH}" ] || [ ! -d "${EFI_PATH}" ]
5661
then
5762
echo "EFI system partition '${EFI_PATH}' not found" >&2

0 commit comments

Comments
 (0)