From c281da8352378cbb3ea244ab6d2b557aada32cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Wed, 31 Jan 2024 15:38:31 +0100 Subject: [PATCH 1/2] grub2-15_ostree: Graceful exit if /etc/default/grub doesn't exist 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: https://github.com/fedora-silverblue/issue-tracker/issues/530 See: https://github.com/fedora-silverblue/issue-tracker/issues/120 See: https://fedoraproject.org/wiki/Changes/FedoraSilverblueBootupd --- src/boot/grub2/grub2-15_ostree | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/boot/grub2/grub2-15_ostree b/src/boot/grub2/grub2-15_ostree index ecd618c97c..a4c69730b6 100644 --- a/src/boot/grub2/grub2-15_ostree +++ b/src/boot/grub2/grub2-15_ostree @@ -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. From 5203d6df282effa7549a177b226ad3dd833770e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Wed, 31 Jan 2024 15:41:54 +0100 Subject: [PATCH 2/2] grub2-15_ostree: Fix whitespace --- src/boot/grub2/grub2-15_ostree | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/grub2/grub2-15_ostree b/src/boot/grub2/grub2-15_ostree index a4c69730b6..f42356153e 100644 --- a/src/boot/grub2/grub2-15_ostree +++ b/src/boot/grub2/grub2-15_ostree @@ -1,5 +1,5 @@ #!/bin/sh -# +# # Copyright (C) 2014 Colin Walters # # This program is free software: you can redistribute it and/or modify