chore: Use the same kernel version check as EyeCantCU/kernel-signer

This commit is contained in:
Kyle Gospodnetich 2024-04-11 16:06:07 -07:00
parent b0b719a175
commit 0cc7b24bf1

View File

@ -2,11 +2,4 @@
set -oue pipefail
if [[ "${AKMODS_FLAVOR}" == "surface" ]]; then
KERNEL_NAME=kernel-surface
else
KERNEL_NAME=kernel
fi
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{FEDORA_VERSION}-%{RELEASE}.%{ARCH}')"
/usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "${KERNEL}" --reproducible -v --add ostree -f /tmp/dracut
/usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "$(rpm -qa | grep -P 'kernel-(|'"$KERNEL_SUFFIX"'-)(\d+\.\d+\.\d+)' | sed -E 's/kernel-(|'"$KERNEL_SUFFIX"'-)//')" --reproducible -v --add ostree -f /tmp/dracut