mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-31 06:32:57 +00:00
14 lines
490 B
Bash
Executable File
14 lines
490 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
set -oue pipefail
|
|
|
|
if [[ "${KERNEL_FLAVOR}" == "surface" ]]; then
|
|
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 |