Bad refactoring, these should be active not cos (#278)

* Bad refactoring, these should be active not cos

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* State should be called statereset everywhere

autoreset was introduced with UKI but we want parity with GRUB

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
Mauro Morales 2024-03-29 16:12:23 +01:00 committed by GitHub
parent 69756e3020
commit 8f68b870d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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()
}

View File

@ -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)