From c611d4da9615ec908287774382e88fcfaf9ff240 Mon Sep 17 00:00:00 2001 From: djach7 Date: Dec 16 2024 21:42:00 +0000 Subject: 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 --- diff --git a/bootupd.yaml b/bootupd.yaml index 3328d41..61a6a9a 100644 --- a/bootupd.yaml +++ b/bootupd.yaml @@ -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 \ No newline at end of file