From a43c798846d2eee12d465462cb7fab555fb2c67d Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Sat, 14 Oct 2023 00:05:24 +0500 Subject: [PATCH] Update --- dracut-initramfs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dracut-initramfs b/dracut-initramfs index e028a37..06fb865 100755 --- a/dracut-initramfs +++ b/dracut-initramfs @@ -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