mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-03 01:44:53 +00:00
Run after reset hook when resetting in UKI mode
To allow the workaround described here: https://github.com/kairos-io/kairos/issues/2304 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
parent
0ae9c04eb4
commit
931c908a2e
@ -78,6 +78,18 @@ func (r *ResetAction) Run() (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if mnt, err := elementalUtils.IsMounted(r.cfg, r.spec.Partitions.OEM); !mnt && err == nil {
|
||||
err = e.MountPartition(r.spec.Partitions.OEM)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err = Hook(r.cfg, constants.AfterResetHook)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_ = elementalUtils.RunStage(r.cfg, "kairos-uki-reset.after")
|
||||
_ = events.RunHookScript("/usr/bin/kairos-agent.uki.reset.after.hook") //nolint:errcheck
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user