aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-11-17 23:41:52 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-11-17 23:41:52 +0900
commitc1fad649e8410a088793e952fcffa7a7df552d2d (patch)
tree97da35e33aebccb636d67b870e09731933d96887
parentb5f01ef20b69e155db299f824ad48c9955deedcf (diff)
app/start: check for cleanup and abort condition
Dirty fix. Will rewrite after fsu integration complete. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
-rw-r--r--internal/app/start.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/app/start.go b/internal/app/start.go
index 0feb0ae6..0b90583a 100644
--- a/internal/app/start.go
+++ b/internal/app/start.go
@@ -251,9 +251,16 @@ func (a *app) Wait() (int, error) {
}
}
- a.shim.AbortWait(errors.New("shim exited"))
- if err := a.seal.sys.Revert(ec); err != nil {
- return err.(RevertCompoundError)
+ if a.shim.Unwrap() == nil {
+ fmsg.VPrintln("fault before shim start")
+ } else {
+ a.shim.AbortWait(errors.New("shim exited"))
+ }
+
+ if a.seal.sys.needRevert {
+ if err := a.seal.sys.Revert(ec); err != nil {
+ return err.(RevertCompoundError)
+ }
}
return nil