Skip to content

Commit

Permalink
enable assesment for all actions
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Nov 25, 2024
1 parent 619ee5b commit a15632a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/uki/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (i *InstallAction) Run() (err error) {
}

// Add boot assessment to files by appending +3 to the name
err = utils.AddBootAssessment(i.cfg.Fs, i.spec.Partitions.EFI.MountPoint, i.cfg.Logger)
err = utils.AddBootAssessment(i.cfg.Fs, constants.UkiEfiDir, i.cfg.Logger)
if err != nil {
i.cfg.Logger.Warnf("adding boot assesment: %s", err.Error())
}
Expand Down
7 changes: 7 additions & 0 deletions pkg/uki/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ func (r *ResetAction) Run() (err error) {
r.cfg.Logger.Errorf("copying recovery to active: %s", err.Error())
return fmt.Errorf("copying recovery to active: %w", err)
}

// Add boot assessment to files by appending +3 to the name
err = elementalUtils.AddBootAssessment(r.cfg.Fs, constants.UkiEfiDir, r.cfg.Logger)
if err != nil {
r.cfg.Logger.Warnf("adding boot assesment: %s", err.Error())
}

// SelectBootEntry sets the default boot entry to the selected entry
err = action.SelectBootEntry(r.cfg, "cos")
// Should we fail? Or warn?
Expand Down
6 changes: 5 additions & 1 deletion pkg/uki/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ func (i *UpgradeAction) Run() (err error) {
i.cfg.Logger.Errorf("removing artifact set: %s", err.Error())
return fmt.Errorf("removing artifact set: %w", err)
}

// Add boot assessment to files by appending +3 to the name
err = elementalUtils.AddBootAssessment(i.cfg.Fs, constants.UkiEfiDir, i.cfg.Logger)
if err != nil {
i.cfg.Logger.Warnf("adding boot assesment: %s", err.Error())
}
// SelectBootEntry sets the default boot entry to the selected entry
err = action.SelectBootEntry(i.cfg, "cos")
// Should we fail? Or warn?
Expand Down

0 comments on commit a15632a

Please sign in to comment.