From 45ff059d4df646c20d914ba64daece49f4d10431 Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Sat, 14 Oct 2023 00:05:34 +0500 Subject: [PATCH] Update --- dracut-ukify | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dracut-ukify b/dracut-ukify index d896393..c1ff7e8 100755 --- a/dracut-ukify +++ b/dracut-ukify @@ -20,7 +20,24 @@ fi declare -a ukify_global_args=() ESP_PATH=$(bootctl --print-esp-path) -BOOT_PATH="${ESP_PATH}/EFI/Linux" +if [ -z "$ESP_PATH" ]; then + exit +else + + if [ ! -d "${ESP_PATH}/EFI/Linux" ]; then + if [ -d "${ESP_PATH}/EFI/linux" ]; then + BOOT_PATH="${ESP_PATH}/EFI/linux" + fi + else + BOOT_PATH="${ESP_PATH}/EFI/Linux" + fi + + if [ -z "$BOOT_PATH" ]; then + mkdir -p "${ESP_PATH}/EFI/Linux" + BOOT_PATH="${ESP_PATH}/EFI/linux" + fi + +fi declare -A kernels update_all=0