From f7c98e67ca6e36b6fefacd9eb3b13c37a1edaa52 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Mon, 1 Jan 2024 12:19:44 +0100 Subject: [PATCH] Do not create an empty config/etc/default/grub file if bootloader is grubby --- internal/configs/configs.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/configs/configs.go b/internal/configs/configs.go index 0ff868f..a77ed95 100644 --- a/internal/configs/configs.go +++ b/internal/configs/configs.go @@ -117,6 +117,12 @@ func InitConfigs() { fmt.Sprintf("%s/grub", config.Path.DEFAULT), } + // If we are using grubby + if config.Bootloader == "grubby" { + // Do not create an empty /etc/default/grub file + files = files[:len(files)-1] + } + for _, conffile := range files { // Get the system file path sysfile := syspath_re.ReplaceAllString(conffile, "")