mirror of
https://github.com/kairos-io/immucore.git
synced 2025-08-17 13:47:05 +00:00
measure PCR phase (#201)
This commit is contained in:
parent
ec9aaa12ed
commit
424392b390
@ -462,6 +462,12 @@ func (s *State) UKIMountBaseSystem(g *herd.Graph) error {
|
|||||||
internalUtils.Log.Err(e).Str("what", m.what).Str("where", m.where).Str("type", m.fs).Msg("Mounting")
|
internalUtils.Log.Err(e).Str("what", m.what).Str("where", m.where).Str("type", m.fs).Msg("Mounting")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
output, err := internalUtils.CommandWithPath("/usr/lib/systemd/systemd-pcrphase --graceful enter-initrd")
|
||||||
|
if err != nil {
|
||||||
|
internalUtils.Log.Err(err).Msg("running systemd-pcrphase")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
internalUtils.Log.Debug().Str("out", output).Msg("systemd-pcrphase enter-initrd")
|
||||||
return err
|
return err
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -476,6 +482,12 @@ func (s *State) UKIBootInitDagStep(g *herd.Graph) error {
|
|||||||
herd.WeakDeps,
|
herd.WeakDeps,
|
||||||
herd.WithWeakDeps(cnst.OpRemountRootRO, cnst.OpRootfsHook, cnst.OpInitramfsHook, cnst.OpWriteFstab),
|
herd.WithWeakDeps(cnst.OpRemountRootRO, cnst.OpRootfsHook, cnst.OpInitramfsHook, cnst.OpWriteFstab),
|
||||||
herd.WithCallback(func(ctx context.Context) error {
|
herd.WithCallback(func(ctx context.Context) error {
|
||||||
|
output, err := internalUtils.CommandWithPath("/usr/lib/systemd/systemd-pcrphase --graceful leave-initrd")
|
||||||
|
if err != nil {
|
||||||
|
internalUtils.Log.Err(err).Msg("running systemd-pcrphase")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
internalUtils.Log.Debug().Str("out", output).Msg("systemd-pcrphase leave-initrd")
|
||||||
// Print dag before exit, otherwise its never printed as we never exit the program
|
// Print dag before exit, otherwise its never printed as we never exit the program
|
||||||
internalUtils.Log.Info().Msg(s.WriteDAG(g))
|
internalUtils.Log.Info().Msg(s.WriteDAG(g))
|
||||||
internalUtils.Log.Debug().Msg("Executing init callback!")
|
internalUtils.Log.Debug().Msg("Executing init callback!")
|
||||||
|
Loading…
Reference in New Issue
Block a user