Skip to content

Commit

Permalink
Bad refactoring, these should be active not cos (#278)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
mauromorales authored Mar 29, 2024
1 parent 69756e3 commit 8f68b87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/action/bootentries.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/uki/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8f68b87

Please sign in to comment.