From 8f68b870d3caddb1ec69a55f87b9a79b955e01cb Mon Sep 17 00:00:00 2001 From: Mauro Morales Date: Fri, 29 Mar 2024 16:12:23 +0100 Subject: [PATCH] Bad refactoring, these should be active not cos (#278) * Bad refactoring, these should be active not cos Signed-off-by: Mauro Morales * State should be called statereset everywhere autoreset was introduced with UKI but we want parity with GRUB Signed-off-by: Mauro Morales --------- Signed-off-by: Mauro Morales --- pkg/action/bootentries.go | 2 +- pkg/uki/install.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/action/bootentries.go b/pkg/action/bootentries.go index abc63aef..821da599 100644 --- a/pkg/action/bootentries.go +++ b/pkg/action/bootentries.go @@ -83,7 +83,7 @@ func selectBootEntrySystemd(cfg *config.Config, entry string) error { } originalEntries := entries - // when there are only 4 entries, we can assume they are either cos (which will be replaced eventually), fallback, recovery or autoreset + // when there are only 4 entries, we can assume they are either cos (which will be replaced eventually), fallback, recovery or statereset if len(entries) == len(cnst.UkiDefaultMenuEntries()) { entries = cnst.UkiDefaultMenuEntries() } diff --git a/pkg/uki/install.go b/pkg/uki/install.go index e54d840d..ec957c7e 100644 --- a/pkg/uki/install.go +++ b/pkg/uki/install.go @@ -143,7 +143,7 @@ func (i *InstallAction) Run() (err error) { return err } - for _, role := range constants.UkiDefaultMenuEntries() { + for _, role := range []string{"active", "passive", "recovery", "statereset"} { if err = copyArtifactSetRole(i.cfg.Fs, i.spec.Partitions.EFI.MountPoint, UnassignedArtifactRole, role, i.cfg.Logger); err != nil { i.cfg.Logger.Errorf("installing the new artifact set as %s: %s", role, err.Error()) return fmt.Errorf("installing the new artifact set as %s: %w", role, err)