14 lines
490 B
Plaintext
Raw Normal View History

2024-04-11 15:25:28 -07:00
#!/usr/bin/bash
set -oue pipefail
if [[ "${KERNEL_FLAVOR}" == "surface" ]]; then
2024-04-11 16:28:14 -07:00
KERNEL_SUFFIX="surface"
else
KERNEL_SUFFIX=""
fi
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(|'"$KERNEL_SUFFIX"'-)(\d+\.\d+\.\d+)' | sed -E 's/kernel-(|'"$KERNEL_SUFFIX"'-)//')"
/usr/libexec/rpm-ostree/wrapped/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