Uki upgrade (#182)

This commit is contained in:
Itxaka
2023-12-18 11:38:26 +01:00
committed by GitHub
parent 2be11b827e
commit 3254b8a36e
10 changed files with 152 additions and 33 deletions

View File

@@ -35,7 +35,7 @@ const (
// ImageSource represents the source from where an image is created for easy identification
type ImageSource struct {
source string
source string `yaml:"source"`
srcType string
}

View File

@@ -202,7 +202,6 @@ func (u *UpgradeSpec) Sanitize() error {
}
return nil
}
func (u *UpgradeSpec) ShouldReboot() bool { return u.Reboot }
func (u *UpgradeSpec) ShouldShutdown() bool { return u.PowerOff }
@@ -526,8 +525,10 @@ func (i *InstallUkiSpec) GetPartitions() ElementalPartitions { return i.Partitio
func (i *InstallUkiSpec) GetExtraPartitions() PartitionList { return i.ExtraPartitions }
type UpgradeUkiSpec struct {
Reboot bool `yaml:"reboot,omitempty" mapstructure:"reboot"`
PowerOff bool `yaml:"poweroff,omitempty" mapstructure:"poweroff"`
Active Image `yaml:"system,omitempty" mapstructure:"system"`
Reboot bool `yaml:"reboot,omitempty" mapstructure:"reboot"`
PowerOff bool `yaml:"poweroff,omitempty" mapstructure:"poweroff"`
EfiPartition *Partition `yaml:"efi-partition,omitempty" mapstructure:"efi-partition"`
}
func (i *UpgradeUkiSpec) Sanitize() error {