Skip to content

Commit

Permalink
chore: Add check for Fedora 41+
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftydinar authored Dec 13, 2024
1 parent 55c20a4 commit ed10821
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/initramfs/initramfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ if ! command -v rpm-ostree &> /dev/null || ! command -v bootc &> /dev/null; then
exit 1
fi

if [[ "${OS_VERSION}" -le 40 ]]; then
echo "This module is only compatible with Fedora 41+ images."
echo "While it is possible to make this module work by installing now-depreciated cliwrap,"
echo "It is an unsupported functionality, which we don't want to enable."
echo "If you wish to make this work, you would need to install cliwrap manually."
exit 1
fi

# NOTE!
# This won't work when Fedora starts to utilize UKIs (Unified Kernel Images).
# UKIs will contain kernel + initramfs + bootloader.
Expand All @@ -28,4 +36,4 @@ fi
echo "Initramfs regeneration is performing for kernel version: ${QUALIFIED_KERNEL[*]}"

dracut --no-hostonly --kver "${QUALIFIED_KERNEL[*]}" --reproducible -v --add ostree -f "${INITRAMFS_IMAGE}"
chmod 0600 "${INITRAMFS_IMAGE}"
chmod 0600 "${INITRAMFS_IMAGE}"

0 comments on commit ed10821

Please sign in to comment.