summaryrefslogtreecommitdiff
path: root/pkg/spec/createconfig.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/spec/createconfig.go')
-rw-r--r--pkg/spec/createconfig.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index d34b21189..6ac9d82da 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -319,6 +319,10 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime) ([]lib
if c.Interactive {
options = append(options, libpod.WithStdin())
}
+ if c.Systemd && (strings.HasSuffix(c.Command[0], "init") ||
+ strings.HasSuffix(c.Command[0], "systemd")) {
+ options = append(options, libpod.WithSystemd())
+ }
if c.Name != "" {
logrus.Debugf("appending name %s", c.Name)
options = append(options, libpod.WithName(c.Name))