mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-07-09 14:13:07 +00:00
https://go.dev/doc/modules/major-version This way we can bump the kairos dependency on the provider-kairos repo which otherwise produced the error: ``` ~/workspace/kairos/provider-kairos (main)*$ go get -u github.com/kairos-io/kairos@v2.0.0-alpha3 go: github.com/kairos-io/kairos@v2.0.0-alpha3: invalid version: module contains a go.mod file, so module path must match major version ("github.com/kairos-io/kairos/v2") ``` Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
29 lines
537 B
Go
29 lines
537 B
Go
package hook
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/kairos-io/kairos-sdk/system"
|
|
config "github.com/kairos-io/kairos/v2/pkg/config"
|
|
)
|
|
|
|
type GrubOptions struct{}
|
|
|
|
func (b GrubOptions) Run(c config.Config) error {
|
|
err := system.Apply(system.SetGRUBOptions(c.Install.GrubOptions))
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type GrubPostInstallOptions struct{}
|
|
|
|
func (b GrubPostInstallOptions) Run(c config.Config) error {
|
|
err := system.Apply(system.SetGRUBOptions(c.GrubOptions))
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
}
|
|
return nil
|
|
}
|