]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: check all entry candidates first, then check existence of $pref/loade... 26863/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 16 Mar 2023 04:33:28 +0000 (13:33 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Mar 2023 11:41:17 +0000 (20:41 +0900)
If we have multiple entries in $ENTRY_TOKEN_SEARCH, and $pref/loader/entries
exists, then previously we would always exit after the first candidate and
ignore the second and later candidates.

Follow-up for 1b43f868934e971480249a6e0fa2f45da906ea2e.

src/kernel-install/kernel-install.in

index bbbd9c8e455ac73129cb4ac7069dfb122429b6cf..a16c29d2aa57259b5ac112d6a39ea7b42a308ca4 100755 (executable)
@@ -217,15 +217,15 @@ for pref in $BOOT_ROOT_SEARCH; do
         else
             log_verbose "$pref/$suff not found…"
         fi
-
-        if [ -d "$pref/loader/entries" ]; then
-            [ -z "$BOOT_ROOT" ] && BOOT_ROOT="$pref"
-            log_verbose "$pref/loader/entries exists, using BOOT_ROOT=$BOOT_ROOT"
-            break 2
-        else
-            log_verbose "$pref/loader/entries not found…"
-        fi
     done
+
+    if [ -d "$pref/loader/entries" ]; then
+        [ -z "$BOOT_ROOT" ] && BOOT_ROOT="$pref"
+        log_verbose "$pref/loader/entries exists, using BOOT_ROOT=$BOOT_ROOT"
+        break
+    else
+        log_verbose "$pref/loader/entries not found…"
+    fi
 done
 
 [ -z "$BOOT_ROOT" ] && for pref in "/efi" "/boot/efi"; do