kairos/internal/agent/hooks/hook.go
Ettore Di Giacinto 9a188b73b6
Add kcrypt to images (#195)
*  Add kcrypt to images

This adds the dracut module and the binary to the images.

Related to https://github.com/kairos-io/kairos/issues/184

*  Add Kcrypt post-install hook

Fixes https://github.com/kairos-io/kairos/issues/184
2022-10-07 13:36:32 +02:00

27 lines
518 B
Go

package hook
import (
config "github.com/kairos-io/kairos/pkg/config"
)
type Interface interface {
Run(c config.Config) error
}
var All = []Interface{
&RunStage{}, // Shells out to stages defined from the container image
&GrubOptions{}, // Set custom GRUB options
&BundleOption{},
&Kcrypt{},
&Lifecycle{}, // Handles poweroff/reboot by config options
}
func Run(c config.Config, hooks ...Interface) error {
for _, h := range hooks {
if err := h.Run(c); err != nil {
return err
}
}
return nil
}