Skip to content

Commit

Permalink
bootupd: Trigger a bootloader update on boot
Browse files Browse the repository at this point in the history
  • Loading branch information
travier committed Oct 15, 2024
1 parent d77dc78 commit 2181f67
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bootupd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,25 @@ postprocess:
- |
#!/bin/bash
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-atomic-desktop.preset

0 comments on commit 2181f67

Please sign in to comment.