Skip to content

Commit

Permalink
grub2-15_ostree: Graceful exit if /etc/default/grub doesn't exist
Browse files Browse the repository at this point in the history
With the new bootupd installation path in Anaconda, the
`/etc/default/grub` config file is not written anymore as we are only
using BLS configs with new enough bootloaders.

We thus don't need to generate (duplicated) legacy boot entries.

We still need to keep this logic in place in Atomic Desktops
(Silverblue, etc.) until we've actually landed bootupd there and forced
a bootloader update for everybody.

See: fedora-silverblue/issue-tracker#530
See: fedora-silverblue/issue-tracker#120
See: https://fedoraproject.org/wiki/Changes/FedoraSilverblueBootupd
  • Loading branch information
travier committed Jan 31, 2024
1 parent 0b0485c commit c281da8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/boot/grub2/grub2-15_ostree
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ if ! test -d /ostree/repo; then
exit 0
fi

# Gracefully exit if we can not find the grub2 'default' configuration as it is
# the case on new installations with bootupd where it is not needed.
if ! test -f /etc/default/grub; then
exit 0
fi

# Gracefully exit if the grub2 configuration has BLS enabled,
# and the installed version has support for the blscfg module.
# Since there is no need to create menu entries for that case.
Expand Down

0 comments on commit c281da8

Please sign in to comment.