]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: if /boot/vmlinuz-$version exists use /boot/ as output dir
authorHarald Hoyer <harald@redhat.com>
Tue, 10 Oct 2017 08:30:44 +0000 (10:30 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 10 Oct 2017 08:30:44 +0000 (10:30 +0200)
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1475565

dracut.sh

index 5ad0f464606dfbe2f9932ac69e3099e4d3824fb9..995d983e987d77229b6e8062fa44eb0ab8f69010 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -773,7 +773,9 @@ if ! [[ $outfile ]]; then
         mkdir -p "$efidir/Linux"
         outfile="$efidir/Linux/linux-$kernel${MACHINE_ID:+-${MACHINE_ID}}${BUILD_ID:+-${BUILD_ID}}.efi"
     else
-        if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
+        if [[ -e "/boot/vmlinuz-$kernel" ]]; then
+            outfile="/boot/initramfs-$kernel.img"
+        elif [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
             outfile="/boot/${MACHINE_ID}/$kernel/initrd"
         else
             outfile="/boot/initramfs-$kernel.img"