distro/rhel9: conditionally enable users module for edge installer

In RHEL 9, for the edge installer, only enable the users module when it
is required for creating a user specified in the blueprint or request.
This commit is contained in:
Achilleas Koutsou 2022-12-13 15:58:03 +01:00 committed by Tom Gundersen
parent e9d01b33c4
commit 83cb043daa

View file

@ -294,7 +294,11 @@ func edgeInstallerImage(workload workload.Workload,
img.SquashfsCompression = "xz"
img.AdditionalDracutModules = []string{"prefixdevname", "prefixdevname-tools"}
img.AdditionalAnacondaModules = []string{"org.fedoraproject.Anaconda.Modules.Users"}
if len(img.Users)+len(img.Groups) > 0 {
// only enable the users module if needed
img.AdditionalAnacondaModules = []string{"org.fedoraproject.Anaconda.Modules.Users"}
}
img.ISOLabelTempl = d.isolabelTmpl
img.Product = d.product