idempotent seal-unseal; e2fsck works as intended; profiling patch applied reliably

This commit is contained in:
Anderson Rosenberg 2025-10-23 14:20:05 -04:00
parent 82229709b6
commit 2f46219400
No known key found for this signature in database
GPG key ID: 7ACF448C0590AB9C
7 changed files with 66 additions and 33 deletions

View file

@ -172,9 +172,6 @@ systemctl enable shufflecake-close.service
# reliant-system/tools
surgeon-dissect -t varlibqubes
reliant-snapshot-rw
if [ "$RELIANT_PROFILING" = "true" ]; then
reliant-profiling-patch-systemd
fi
# reliant-system/qubes-sflc
depmod -a "$RELIANT_KERNEL_VERSION"
@ -182,7 +179,23 @@ depmod -a "$RELIANT_KERNEL_VERSION"
# reliant-system/dracut
dracut --force --regenerate-all
if [ "$RELIANT_PROFILING" = "true" ]; then
RELIANT_PROFILING=true dracut --force "/boot/initramfs-$RELIANT_KERNEL_VERSION.reliant-profiling.img"
# Perform the patch
reliant-profiling-patch-systemd
old=/usr/lib/systemd/systemd-volatile-root
new=/usr/lib/systemd/systemd-volatile-root.reliant-profiling
# Switch
tmpname="/tmp/reliant.$(uuidgen)"
mv "$old" "$tmpname"
mv "$new" "$old"
# Build
dracut --force "/boot/initramfs-$RELIANT_KERNEL_VERSION.reliant-profiling.img"
# Switch back
rm "$old"
mv "$tmpname" "$old"
rm "$tmpname"
fi
# Report successful installation