distro: add ShellVars field to ImageConfig

This commit is contained in:
Achilleas Koutsou 2023-02-15 14:34:56 +01:00 committed by Tomáš Hozza
parent 816d23988c
commit 3f299c7d43
5 changed files with 7 additions and 0 deletions

View file

@ -143,6 +143,7 @@ func osCustomizations(
// should have been validated before this point.
panic(fmt.Sprintf("failed to convert file customizations to fs node files: %v", err))
}
osc.ShellInit = imageConfig.ShellInit
osc.Grub2Config = imageConfig.Grub2Config
osc.Sysconfig = imageConfig.Sysconfig

View file

@ -5,6 +5,7 @@ import (
"reflect"
"github.com/osbuild/osbuild-composer/internal/osbuild"
"github.com/osbuild/osbuild-composer/internal/shell"
)
type RHSMSubscriptionStatus string
@ -38,6 +39,8 @@ type ImageConfig struct {
// Disable documentation
ExcludeDocs *bool
ShellInit []shell.InitFile
// for RHSM configuration, we need to potentially distinguish the case
// when the user want the image to be subscribed on first boot and when not
RHSMConfig map[RHSMSubscriptionStatus]*osbuild.RHSMStageOptions

View file

@ -156,6 +156,7 @@ func osCustomizations(
// should have been validated before this point.
panic(fmt.Sprintf("failed to convert file customizations to fs node files: %v", err))
}
osc.ShellInit = imageConfig.ShellInit
osc.Grub2Config = imageConfig.Grub2Config
osc.Sysconfig = imageConfig.Sysconfig

View file

@ -162,6 +162,7 @@ func osCustomizations(
// should have been validated before this point.
panic(fmt.Sprintf("failed to convert file customizations to fs node files: %v", err))
}
osc.ShellInit = imageConfig.ShellInit
osc.Grub2Config = imageConfig.Grub2Config
osc.Sysconfig = imageConfig.Sysconfig

View file

@ -159,6 +159,7 @@ func osCustomizations(
// should have been validated before this point.
panic(fmt.Sprintf("failed to convert file customizations to fs node files: %v", err))
}
osc.ShellInit = imageConfig.ShellInit
osc.Grub2Config = imageConfig.Grub2Config
osc.Sysconfig = imageConfig.Sysconfig