mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-28 21:01:46 +00:00
* ✨ Add state api This is related to https://github.com/kairos-io/kairos/issues/34. Starts to unify the API to retrieve the state in the sdk to have a common place to query system status information. * 🤖 Add test * Update go.mod * ⚙️ Fine-tune detection of partitions * 🤖 Add more fine-grained tests * 🎨 Add /dev/ to partition name * 🤖 Fixup tests * ⚙️ Remount accessors * ✨ Add state partition to cloud-init paths * 📝 Upper case Kairos in motd * 🎨 Add mounts sdk * 🎨 Set grub options via SDK * 🎨 Make it more idiomatic
19 lines
322 B
Go
19 lines
322 B
Go
package hook
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
config "github.com/kairos-io/kairos/pkg/config"
|
|
"github.com/kairos-io/kairos/sdk/system"
|
|
)
|
|
|
|
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
|
|
}
|