Adds bootupd update to boot process

Updates bootupd.yaml to enable bootupctl-update upon system boot. This allows bootupd to work as expected on Fedora IoT raw image systems, with all expected components installed.

Signed-off-by: djach7 <djachimo@redhat.com>
This commit is contained in:
djach7 2024-12-16 14:58:43 -05:00
commit c611d4da96

View file

@ -11,3 +11,22 @@ postprocess:
set -xeuo pipefail
# Transforms /usr/lib/ostree-boot into a bootupd-compatible update payload
/usr/bin/bootupctl backend generate-update-metadata
# Trigger a bootloader update on boot
cat > /usr/lib/systemd/system/bootloader-update.service << 'EOF'
[Unit]
Description=Update bootloader on boot
Documentation=https://github.com/coreos/bootupd
ConditionFirmware=uefi
[Service]
Type=oneshot
ExecStart=/usr/bin/bootupctl update
RemainAfterExit=yes
MountFlags=slave
[Install]
WantedBy=multi-user.target
EOF
chmod 644 /usr/lib/systemd/system/bootloader-update.service
echo "enable bootloader-update.service" > /usr/lib/systemd/system-preset/81-iot.preset