Skip to content

Commit

Permalink
fix: add cliwrap for initramfs gereration
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Mihalik committed Jun 28, 2024
1 parent 3757897 commit 6ffc79f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-initramfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

set -oue pipefail

if [[ "${AKMODS_FLAVOR}" == "surface" ]]; then

if [[ "${KERNEL_FLAVOR}" == "surface" ]]; then
KERNEL_SUFFIX="surface"
else
KERNEL_SUFFIX=""
fi

rpm-ostree cliwrap install-to-root /

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"
Expand Down

0 comments on commit 6ffc79f

Please sign in to comment.