]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix: adding missing efi paths
authorJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 28 Jan 2021 14:15:07 +0000 (14:15 +0000)
committerHarald Hoyer <harald@hoyer.xyz>
Wed, 10 Feb 2021 13:39:54 +0000 (14:39 +0100)
dracut-initramfs-restore.sh

index 184697722e5121748d8e801fd99c24b15fe25198..ff6c386986ad17796329d6c40d5a67dba8d2352d 100644 (file)
@@ -16,10 +16,17 @@ SKIP="$dracutbasedir/skipcpio"
 
 mount -o ro /boot &>/dev/null || true
 
-if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then
+if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
+    && [[ $MACHINE_ID ]] \
+    && [[ -d /efi/${MACHINE_ID} || -L /efi/${MACHINE_ID} ]] ; then
+    IMG="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
+elif [[ -d /boot/loader/entries || -L /boot/loader/entries ]] \
+    && [[ $MACHINE_ID ]] \
+    && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then
     IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
+else
+    IMG="/boot/initramfs-${KERNEL_VERSION}.img"
 fi
-[[ -f $IMG ]] || IMG="/boot/initramfs-${KERNEL_VERSION}.img"
 
 cd /run/initramfs