Use rpm to get kernel version instead and use dracut to build kernel modules
All checks were successful
bluebuild / Build Custom Image (recipe.yml) (pull_request) Successful in 7m42s

This commit is contained in:
2025-10-03 13:45:06 -04:00
parent 223e058a30
commit 05d87d642c
4 changed files with 11 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Obtained from wayblue project https://github.com/wayblueorg/wayblue/blob/live/files/scripts/regenerateinitramfs.sh
set -oue pipefail
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(\d+\.\d+\.\d+)' | sed -E 's/kernel-//')"
/usr/bin/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible -v --add ostree -f "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
chmod 0600 "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"