distro: add Authconfig to ImageConfig
Add it to all distros (8.6, 9.0) that support using ImageConfig.
This commit is contained in:
parent
24d8790f9d
commit
adfdb2cd39
3 changed files with 12 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ type ImageConfig struct {
|
|||
Sysctld []*osbuild2.SysctldStageOptions
|
||||
DNFConfig []*osbuild2.DNFConfigStageOptions
|
||||
SshdConfig *osbuild2.SshdConfigStageOptions
|
||||
Authconfig *osbuild2.AuthconfigStageOptions
|
||||
}
|
||||
|
||||
// InheritFrom inherits unset values from the provided parent configuration and
|
||||
|
|
@ -110,6 +111,9 @@ func (c *ImageConfig) InheritFrom(parentConfig *ImageConfig) *ImageConfig {
|
|||
if finalConfig.SshdConfig == nil {
|
||||
finalConfig.SshdConfig = parentConfig.SshdConfig
|
||||
}
|
||||
if finalConfig.Authconfig == nil {
|
||||
finalConfig.Authconfig = parentConfig.Authconfig
|
||||
}
|
||||
}
|
||||
return &finalConfig
|
||||
}
|
||||
|
|
|
|||
|
|
@ -537,6 +537,10 @@ func osPipeline(t *imageType,
|
|||
p.AddStage((osbuild.NewSshdConfigStage(sshdConfig)))
|
||||
}
|
||||
|
||||
if authConfig := imageConfig.Authconfig; authConfig != nil {
|
||||
p.AddStage(osbuild.NewAuthconfigStage(authConfig))
|
||||
}
|
||||
|
||||
if pt != nil {
|
||||
p = prependKernelCmdlineStage(p, t, pt)
|
||||
p.AddStage(osbuild.NewFSTabStage(osbuild.NewFSTabStageOptions(pt)))
|
||||
|
|
|
|||
|
|
@ -528,6 +528,10 @@ func osPipeline(t *imageType,
|
|||
p.AddStage((osbuild.NewSshdConfigStage(sshdConfig)))
|
||||
}
|
||||
|
||||
if authConfig := imageConfig.Authconfig; authConfig != nil {
|
||||
p.AddStage(osbuild.NewAuthconfigStage(authConfig))
|
||||
}
|
||||
|
||||
if pt != nil {
|
||||
kernelOptions := osbuild.GenImageKernelOptions(pt)
|
||||
if t.kernelOptions != "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue