diff --git a/pkg/distro/generic/images.go b/pkg/distro/generic/images.go index 88fad18f59..fe2c9a0910 100644 --- a/pkg/distro/generic/images.go +++ b/pkg/distro/generic/images.go @@ -391,13 +391,7 @@ func installerCustomizations(t *imageType, c *blueprint.Customizations) (manifes isc.ISOBoot = *isoboot } - for _, tmpl := range installerConfig.LoraxTemplates { - isc.LoraxTemplates = append(isc.LoraxTemplates, manifest.InstallerLoraxTemplate{ - Path: tmpl.Path, - AfterDracut: tmpl.AfterDracut, - }) - } - + isc.LoraxTemplates = installerConfig.LoraxTemplates if pkg := installerConfig.LoraxTemplatePackage; pkg != nil { isc.LoraxTemplatePackage = *pkg } diff --git a/pkg/distro/installer_config.go b/pkg/distro/installer_config.go index d4def14859..6895bb3576 100644 --- a/pkg/distro/installer_config.go +++ b/pkg/distro/installer_config.go @@ -28,15 +28,10 @@ type InstallerConfig struct { ISOBootType *manifest.ISOBootType `yaml:"iso_boot_type,omitempty"` // Lorax template settings for org.osbuild.lorax stage - LoraxTemplates []InstallerLoraxTemplate `yaml:"lorax_templates,omitempty"` - LoraxTemplatePackage *string `yaml:"lorax_template_package"` - LoraxLogosPackage *string `yaml:"lorax_logos_package"` - LoraxReleasePackage *string `yaml:"lorax_release_package"` -} - -type InstallerLoraxTemplate struct { - Path string `yaml:"path"` - AfterDracut bool `yaml:"after_dracut,omitempty"` + LoraxTemplates []manifest.InstallerLoraxTemplate `yaml:"lorax_templates,omitempty"` + LoraxTemplatePackage *string `yaml:"lorax_template_package"` + LoraxLogosPackage *string `yaml:"lorax_logos_package"` + LoraxReleasePackage *string `yaml:"lorax_release_package"` } // InheritFrom inherits unset values from the provided parent configuration and diff --git a/pkg/manifest/installer.go b/pkg/manifest/installer.go index 301f14c618..42513fdc98 100644 --- a/pkg/manifest/installer.go +++ b/pkg/manifest/installer.go @@ -36,6 +36,7 @@ type InstallerCustomizations struct { } type InstallerLoraxTemplate struct { - Path string - AfterDracut bool // Should this template be executed after dracut? Defaults to not. + Path string `yaml:"path"` + // Should this template be executed after dracut? Defaults to not. + AfterDracut bool `yaml:"after_dracut,omitempty"` }