diff --git a/internal/distro/fedora31/distro.go b/internal/distro/fedora31/distro.go index d3b651acd..3a1338429 100644 --- a/internal/distro/fedora31/distro.go +++ b/internal/distro/fedora31/distro.go @@ -448,6 +448,10 @@ func (t *imageType) pipeline(c *blueprint.Customizations, repos []rpmmd.RepoConf p.AddStage(osbuild.NewChronyStage(&osbuild.ChronyStageOptions{ntpServers})) } + if groups := c.GetGroups(); len(groups) > 0 { + p.AddStage(osbuild.NewGroupsStage(t.groupStageOptions(groups))) + } + if users := c.GetUsers(); len(users) > 0 { options, err := t.userStageOptions(users) if err != nil { @@ -456,10 +460,6 @@ func (t *imageType) pipeline(c *blueprint.Customizations, repos []rpmmd.RepoConf p.AddStage(osbuild.NewUsersStage(options)) } - if groups := c.GetGroups(); len(groups) > 0 { - p.AddStage(osbuild.NewGroupsStage(t.groupStageOptions(groups))) - } - if t.bootable { p.AddStage(osbuild.NewFSTabStage(t.fsTabStageOptions(t.arch.uefi))) p.AddStage(osbuild.NewGRUB2Stage(t.grub2StageOptions(t.kernelOptions, c.GetKernel(), t.arch.uefi))) diff --git a/internal/distro/fedora32/distro.go b/internal/distro/fedora32/distro.go index 838f5397e..cf659edd6 100644 --- a/internal/distro/fedora32/distro.go +++ b/internal/distro/fedora32/distro.go @@ -252,6 +252,10 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp p.AddStage(osbuild.NewChronyStage(&osbuild.ChronyStageOptions{Timeservers: ntpServers})) } + if groups := c.GetGroups(); len(groups) > 0 { + p.AddStage(osbuild.NewGroupsStage(t.groupStageOptions(groups))) + } + if users := c.GetUsers(); len(users) > 0 { options, err := t.userStageOptions(users) if err != nil { @@ -260,10 +264,6 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp p.AddStage(osbuild.NewUsersStage(options)) } - if groups := c.GetGroups(); len(groups) > 0 { - p.AddStage(osbuild.NewGroupsStage(t.groupStageOptions(groups))) - } - if t.bootable { p.AddStage(osbuild.NewFSTabStage(t.fsTabStageOptions(t.arch.uefi))) p.AddStage(osbuild.NewGRUB2Stage(t.grub2StageOptions(t.kernelOptions, c.GetKernel(), t.arch.uefi))) diff --git a/internal/distro/rhel8/distro.go b/internal/distro/rhel8/distro.go index 24188d70f..a43f4fceb 100644 --- a/internal/distro/rhel8/distro.go +++ b/internal/distro/rhel8/distro.go @@ -273,6 +273,10 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp p.AddStage(osbuild.NewChronyStage(&osbuild.ChronyStageOptions{Timeservers: ntpServers})) } + if groups := c.GetGroups(); len(groups) > 0 { + p.AddStage(osbuild.NewGroupsStage(t.groupStageOptions(groups))) + } + if users := c.GetUsers(); len(users) > 0 { options, err := t.userStageOptions(users) if err != nil { @@ -281,10 +285,6 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp p.AddStage(osbuild.NewUsersStage(options)) } - if groups := c.GetGroups(); len(groups) > 0 { - p.AddStage(osbuild.NewGroupsStage(t.groupStageOptions(groups))) - } - if services := c.GetServices(); services != nil || t.enabledServices != nil { p.AddStage(osbuild.NewSystemdStage(t.systemdStageOptions(t.enabledServices, t.disabledServices, services, t.defaultTarget))) }