diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-03-03 17:39:53 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-03-03 17:39:53 +0100 |
commit | 05a0bf7c07e53a3142fb4e6d1bb71e60ee16e5c9 (patch) | |
tree | f3527eedb5d34a78e230fb696513733db35adc14 /pkg/systemd/generate/systemdgen.go | |
parent | 3bc5f431d4df9724501a42a68e333f7e98a0b0cf (diff) | |
download | podman-05a0bf7c07e53a3142fb4e6d1bb71e60ee16e5c9.tar.gz podman-05a0bf7c07e53a3142fb4e6d1bb71e60ee16e5c9.tar.bz2 podman-05a0bf7c07e53a3142fb4e6d1bb71e60ee16e5c9.zip |
generate systemd: add network dependencies
Add network dependencies to generated systemd services to allow for
enabling them at system startup and have a working network if needed.
Fixes: #4130
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/systemd/generate/systemdgen.go')
-rw-r--r-- | pkg/systemd/generate/systemdgen.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/systemd/generate/systemdgen.go b/pkg/systemd/generate/systemdgen.go index 404347828..999a65126 100644 --- a/pkg/systemd/generate/systemdgen.go +++ b/pkg/systemd/generate/systemdgen.go @@ -80,6 +80,8 @@ const containerTemplate = `# {{.ServiceName}}.service [Unit] Description=Podman {{.ServiceName}}.service Documentation=man:podman-generate-systemd(1) +Wants=network.target +After=network-online.target {{- if .BoundToServices}} RefuseManualStart=yes RefuseManualStop=yes |