summaryrefslogtreecommitdiff
path: root/pkg/spec/createconfig.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-10-16 13:26:20 -0400
committerGitHub <noreply@github.com>2018-10-16 13:26:20 -0400
commita2266c63b4368eebfe3a1b9ea469c65e7cceb69a (patch)
treecd26d33445fb2850e78c89869002efb1abfd2bff /pkg/spec/createconfig.go
parent81e63ac309e8bde6603faf07a98a7963e9397188 (diff)
parent57a8c2e5e844ee403c9a703c621780de7c7343f0 (diff)
downloadpodman-a2266c63b4368eebfe3a1b9ea469c65e7cceb69a.tar.gz
podman-a2266c63b4368eebfe3a1b9ea469c65e7cceb69a.tar.bz2
podman-a2266c63b4368eebfe3a1b9ea469c65e7cceb69a.zip
Merge pull request #1650 from rhatdan/systemd
Mount proper cgroup for systemd to manage inside of the container.
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))