mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-08 11:47:23 +00:00
* 🤖 Add bundles and sysext test * ✨ Exec bundles also after install * 🤖 Adapt tests * 🎨 Create dir only if doesn't exist * 🎨 Return err on mount * 🎨 Make bundle errors failure as an option * 🎨 Minor fixups * debug * 🤖 Fix spec * 🤖 Get correct version for bundle test * 🎨 Fixups * 🤖 systemd-sysext is available only on opensuse for now
26 lines
506 B
Go
26 lines
506 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{},
|
|
&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
|
|
}
|