Only default to systemd if built with the systemd buildtag
For packages that don't ship with systemd, this changes the default for those distros. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
50451a3d39
commit
caf7fd95ca
|
|
@ -211,7 +211,7 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||||
if onCgroupsv2, _ := isCgroup2UnifiedMode(); onCgroupsv2 {
|
if onCgroupsv2, _ := isCgroup2UnifiedMode(); onCgroupsv2 {
|
||||||
c.OCIRuntime = "crun"
|
c.OCIRuntime = "crun"
|
||||||
}
|
}
|
||||||
c.CgroupManager = SystemdCgroupsManager
|
c.CgroupManager = defaultCgroupManager()
|
||||||
c.StopTimeout = uint(10)
|
c.StopTimeout = uint(10)
|
||||||
|
|
||||||
c.OCIRuntimes = map[string][]string{
|
c.OCIRuntimes = map[string][]string{
|
||||||
|
|
@ -269,7 +269,7 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||||
c.InfraImage = DefaultInfraImage
|
c.InfraImage = DefaultInfraImage
|
||||||
c.EnablePortReservation = true
|
c.EnablePortReservation = true
|
||||||
c.NumLocks = 2048
|
c.NumLocks = 2048
|
||||||
c.EventsLogger = "journald"
|
c.EventsLogger = defaultEventsLogger()
|
||||||
c.DetachKeys = DefaultDetachKeys
|
c.DetachKeys = DefaultDetachKeys
|
||||||
c.SDNotify = false
|
c.SDNotify = false
|
||||||
// TODO - ideally we should expose a `type LockType string` along with
|
// TODO - ideally we should expose a `type LockType string` along with
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
// +build !systemd
|
||||||
|
|
||||||
|
package config
|
||||||
|
|
||||||
|
func defaultCgroupManager() string {
|
||||||
|
return "cgroupfs"
|
||||||
|
}
|
||||||
|
|
||||||
|
func defaultEventsLogger() string {
|
||||||
|
return "file"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
// +build systemd
|
||||||
|
|
||||||
|
package config
|
||||||
|
|
||||||
|
func defaultCgroupManager() string {
|
||||||
|
return SystemdCgroupsManager
|
||||||
|
}
|
||||||
|
func defaultEventsLogger() string {
|
||||||
|
return "journald"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue