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