summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/storage.go
diff options
context:
space:
mode:
authorJoseph Gooch <mrwizard@dok.org>2020-06-16 14:57:43 +0000
committerJoseph Gooch <mrwizard@dok.org>2020-06-16 17:37:39 +0000
commiteb8bfdad3e6e4f3bbb308c2ae8c8b6dbba7d4f1c (patch)
treecac643da5385b06261a361a8d32614de65243955 /pkg/specgen/generate/storage.go
parent0968f25988624699f2db559f0a984cf84c8a284f (diff)
downloadpodman-eb8bfdad3e6e4f3bbb308c2ae8c8b6dbba7d4f1c.tar.gz
podman-eb8bfdad3e6e4f3bbb308c2ae8c8b6dbba7d4f1c.tar.bz2
podman-eb8bfdad3e6e4f3bbb308c2ae8c8b6dbba7d4f1c.zip
Fix --init and --init-path
Init properly passed into specgen Allow --init with --systemd=true but not --systemd=always. Signed-off-by: Joseph Gooch <mrwizard@dok.org>
Diffstat (limited to 'pkg/specgen/generate/storage.go')
-rw-r--r--pkg/specgen/generate/storage.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/specgen/generate/storage.go b/pkg/specgen/generate/storage.go
index 241c9adeb..0d78421a6 100644
--- a/pkg/specgen/generate/storage.go
+++ b/pkg/specgen/generate/storage.go
@@ -314,8 +314,8 @@ func addContainerInitBinary(s *specgen.SpecGenerator, path string) (spec.Mount,
if !s.PidNS.IsPrivate() {
return mount, fmt.Errorf("cannot add init binary as PID 1 (PID namespace isn't private)")
}
- if s.Systemd == "true" || s.Systemd == "always" {
- return mount, fmt.Errorf("cannot use container-init binary with systemd")
+ if s.Systemd == "always" {
+ return mount, fmt.Errorf("cannot use container-init binary with systemd=always")
}
if _, err := os.Stat(path); os.IsNotExist(err) {
return mount, errors.Wrap(err, "container-init binary not found on the host")