mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-16 14:40:28 +00:00
sparkles: Boot options (#91)
* ✨ Add grub_options to config Split post-install into hooks * 🤖 Adapt test to latest releases
This commit is contained in:
committed by
Itxaka
parent
01c6a99577
commit
b7fec41fe3
24
internal/agent/hooks/hook.go
Normal file
24
internal/agent/hooks/hook.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package hook
|
||||
|
||||
import (
|
||||
config "github.com/c3os-io/c3os/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
|
||||
&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
|
||||
}
|
Reference in New Issue
Block a user