package bootenv import ( "github.com/portainer/kubesolo-os/update/pkg/grubenv" ) // GRUBEnv implements BootEnv using GRUB environment variables. type GRUBEnv struct { env *grubenv.Env } // NewGRUB creates a new GRUB-based BootEnv. func NewGRUB(path string) BootEnv { return &GRUBEnv{env: grubenv.New(path)} } func (g *GRUBEnv) ActiveSlot() (string, error) { return g.env.ActiveSlot() } func (g *GRUBEnv) PassiveSlot() (string, error) { return g.env.PassiveSlot() } func (g *GRUBEnv) BootCounter() (int, error) { return g.env.BootCounter() } func (g *GRUBEnv) BootSuccess() (bool, error) { return g.env.BootSuccess() } func (g *GRUBEnv) MarkBootSuccess() error { return g.env.MarkBootSuccess() } func (g *GRUBEnv) ActivateSlot(slot string) error { return g.env.ActivateSlot(slot) } func (g *GRUBEnv) ForceRollback() error { return g.env.ForceRollback() }