Required by https://fedoraproject.org/wiki/Changes/AutomaticBootloaderUpdatesBootc Inspired by Dusty's comment https://github.com/coreos/fedora-coreos-config/pull/3653#issuecomment-3156107015 `bootloader-update.service` is shipped in `rust-bootupd-0.2.26-3` (https://src.fedoraproject.org/rpms/rust-bootupd/c/28a98663eabd21cb9e9ff334700d554d36c0b0aa?branch=rawhide) but it is disabled by default. Track issue: https://github.com/coreos/fedora-coreos-tracker/issues/1468
30 lines
1.1 KiB
YAML
30 lines
1.1 KiB
YAML
# Postprocessing relating to systemd presets on the system.
|
|
postprocess:
|
|
- |
|
|
#!/bin/bash
|
|
set -xeuo pipefail
|
|
# Override some of the default presets.
|
|
cat <<EOF > usr/lib/systemd/system-preset/85-bootc.preset
|
|
# Disable dnf-makecache.timer on bootc/image mode systems
|
|
# https://github.com/coreos/fedora-coreos-tracker/issues/1896#issuecomment-2848251507
|
|
disable dnf-makecache.timer
|
|
EOF
|
|
# Enable bootloader-update.service on F43+.
|
|
# https://github.com/coreos/fedora-coreos-tracker/issues/1468#issuecomment-2996654547
|
|
# https://fedoraproject.org/wiki/Changes/AutomaticBootloaderUpdatesBootc
|
|
- |
|
|
#!/bin/bash
|
|
set -xeuo pipefail
|
|
source /usr/lib/os-release
|
|
if [ $ID == "fedora" ] && [ ${VERSION_ID} -ge 43 ]; then
|
|
echo "enable bootloader-update.service" >> /usr/lib/systemd/system-preset/85-bootc.preset
|
|
fi
|
|
# Undo RPM scripts enabling units; we want the presets to be canonical
|
|
# https://github.com/projectatomic/rpm-ostree/issues/1803
|
|
- |
|
|
#!/bin/bash
|
|
set -xeuo pipefail
|
|
rm -rf /etc/systemd/system/*
|
|
systemctl preset-all
|
|
rm -rf /etc/systemd/user/*
|
|
systemctl --user --global preset-all
|