distro/{rhel8,rhel84}: set systemd default targets
An image only had a systemd stage added if its blueprint contained services or if its image type contained enabled services. The systemd stage is now also added if the image type contains disabled services or a default target. The RHEL 8.4 qcow2 image type now specifies the multi-user default target. In order to test this the image-info tool now includes the default target in its output. Image test manifests are updated to include this change.
This commit is contained in:
parent
01c21b5a47
commit
15969e0adc
41 changed files with 75 additions and 3 deletions
|
|
@ -288,7 +288,7 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp
|
|||
p.AddStage(osbuild.NewUsersStage(options))
|
||||
}
|
||||
|
||||
if services := c.GetServices(); services != nil || t.enabledServices != nil {
|
||||
if services := c.GetServices(); services != nil || t.enabledServices != nil || t.disabledServices != nil || t.defaultTarget != "" {
|
||||
p.AddStage(osbuild.NewSystemdStage(t.systemdStageOptions(t.enabledServices, t.disabledServices, services, t.defaultTarget)))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp
|
|||
p.AddStage(osbuild.NewUsersStage(options))
|
||||
}
|
||||
|
||||
if services := c.GetServices(); services != nil || t.enabledServices != nil {
|
||||
if services := c.GetServices(); services != nil || t.enabledServices != nil || t.disabledServices != nil || t.defaultTarget != "" {
|
||||
p.AddStage(osbuild.NewSystemdStage(t.systemdStageOptions(t.enabledServices, t.disabledServices, services, t.defaultTarget)))
|
||||
}
|
||||
|
||||
|
|
@ -958,6 +958,7 @@ func New() distro.Distro {
|
|||
// https://errata.devel.redhat.com/advisory/47339 lands
|
||||
"timedatex",
|
||||
},
|
||||
defaultTarget: "multi-user.target",
|
||||
kernelOptions: "console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 crashkernel=auto",
|
||||
bootable: true,
|
||||
defaultSize: 10 * GigaByte,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue