mirror of
https://gitlab.com/fedora/bootc/base-images.git
synced 2026-09-01 14:00:46 +00:00
Merge branch 'c9s-bootloader-update' into 'main'
Enable `bootloader-update.service` for >= CentOS9 See merge request fedora/bootc/base-images!456
This commit is contained in:
commit
ba7878ca77
1 changed files with 15 additions and 4 deletions
|
|
@ -9,16 +9,27 @@ postprocess:
|
|||
# https://github.com/coreos/fedora-coreos-tracker/issues/1896#issuecomment-2848251507
|
||||
disable dnf-makecache.timer
|
||||
EOF
|
||||
# Enable bootloader-update.service on F43+.
|
||||
# Enable bootloader-update.service on F43+ and CentOS9+
|
||||
# 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
|
||||
|
||||
preset_file_name=/usr/lib/systemd/system-preset/85-bootc-bootloader-update.preset
|
||||
|
||||
case "$ID" in
|
||||
fedora)
|
||||
[ "$VERSION_ID" -ge 43 ] && echo "enable bootloader-update.service" >> "$preset_file_name"
|
||||
;;
|
||||
|
||||
centos)
|
||||
[ "$VERSION_ID" -ge 9 ] && echo "enable bootloader-update.service" >> "$preset_file_name"
|
||||
;;
|
||||
|
||||
*) ;;
|
||||
esac
|
||||
# Undo RPM scripts enabling units; we want the presets to be canonical
|
||||
# https://github.com/projectatomic/rpm-ostree/issues/1803
|
||||
- |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue