52fb8f6eda
From-source-git-commit: 56bf1917de004cd3f9032a68a6cd09d5bd972b04 Additional fixes: - support for erofs in squash modules - always include the resume module - include systemd config files from /usr/lib/systemd - only return block devices from get_persistent_dev - allow for \ in get_maj_min file path - install blk modules using symbol blk_alloc_disk Resolves: RHEL-32237,RHEL-32506,RHEL-43460,RHEL-47145,RHEL-49744,RHEL-53350
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From 1bd81956dc050db071c5885cfbcde393370468ae Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Tue, 18 Jan 2022 18:58:58 +0100
|
|
Subject: [PATCH 05/24] fix(kernel-install): do not generate an initrd when one
|
|
was specified
|
|
|
|
According to the synopsis, kernel-install can be called with an
|
|
already-prepared initrd. In that case, no initrd should be generated by dracut.
|
|
|
|
(Cherry-picked commit 0b72cf5c4eca0e0db76e3e210cfdc48e6b49bb74 from PR#1825)
|
|
---
|
|
install.d/50-dracut.install | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install
|
|
index efb184cd..3907e303 100755
|
|
--- a/install.d/50-dracut.install
|
|
+++ b/install.d/50-dracut.install
|
|
@@ -4,6 +4,7 @@ COMMAND="$1"
|
|
KERNEL_VERSION="$2"
|
|
BOOT_DIR_ABS="$3"
|
|
KERNEL_IMAGE="$4"
|
|
+INITRD_OPTIONS_SHIFT=4
|
|
|
|
# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory.
|
|
# In this case, do not create the initrd.
|
|
@@ -34,6 +35,9 @@ ret=0
|
|
|
|
case "$COMMAND" in
|
|
add)
|
|
+ # If the initrd was provided on the kernel command line, we shouldn't generate our own.
|
|
+ [ "$#" -gt "$INITRD_OPTIONS_SHIFT" ] && exit 0
|
|
+
|
|
if [[ $IMAGE == "uki.efi" ]]; then
|
|
IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi
|
|
else
|
|
--
|
|
2.42.0
|
|
|