Skip to content

Commit

Permalink
fix: incorrectly applied patch in commit c6d18c3
Browse files Browse the repository at this point in the history
named: "feat(kernel-install): do nothing when $KERNEL_INSTALL_INITRD_GENERATOR says so"
  • Loading branch information
pvalena committed Jul 11, 2024
1 parent 6cb58e8 commit 6edc31b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
30 changes: 28 additions & 2 deletions install.d/50-dracut.install
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,34 @@ if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then
exit 0
fi

if [[ -d "$BOOT_DIR_ABS" ]]; then
INITRD="initrd"
# Do not attempt to create initramfs if the supplied image is already a UKI
if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then
exit 0
fi

# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess.
if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
if [[ -z $KERNEL_INSTALL_UKI_GENERATOR || $KERNEL_INSTALL_UKI_GENERATOR == "dracut" ]]; then
# No uki generator preference set or we have been chosen
IMAGE="uki.efi"
UEFI_OPTS="--uefi"
elif [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then
# We aren't the uki generator, but we have been requested to make the initrd
IMAGE="initrd"
UEFI_OPTS="--no-uefi"
else
exit 0
fi
elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
if [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then
IMAGE="initrd"
UEFI_OPTS="--no-uefi"
else
exit 0
fi

else
# No layout information, use users --uefi/--no-uefi preference
UEFI_OPTS=""
Expand Down
6 changes: 3 additions & 3 deletions install.d/51-dracut-rescue.install
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then
exit 0
fi

dropindirs_sort()
{
suffix=$1; shift
dropindirs_sort() {
suffix=$1
shift
args=("$@")
files=$(
while (($# > 0)); do
Expand Down

0 comments on commit 6edc31b

Please sign in to comment.