diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-05-29 11:40:28 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-06-11 11:01:13 +0200 |
commit | 144c6bb76d7652f53167d4bc7130cf897f5903a1 (patch) | |
tree | 948138d4ef50af9bbc0f12fd949074a4e8832728 /pkg/systemd/generate/systemdgen.go | |
parent | cf89bb671184e453c4ba5f27e26d02216d8fc491 (diff) | |
download | podman-144c6bb76d7652f53167d4bc7130cf897f5903a1.tar.gz podman-144c6bb76d7652f53167d4bc7130cf897f5903a1.tar.bz2 podman-144c6bb76d7652f53167d4bc7130cf897f5903a1.zip |
generate systemd: rename "cid" to "ctr-id"
Rename the container ID file from "cid" to "ctr-id" to make the
generated unit files a) easier to read and to b) pro-actively
avoid any confusion when pod ID files are being added in the
future.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/systemd/generate/systemdgen.go')
-rw-r--r-- | pkg/systemd/generate/systemdgen.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/systemd/generate/systemdgen.go b/pkg/systemd/generate/systemdgen.go index 538e54ec9..fb0ea5cf9 100644 --- a/pkg/systemd/generate/systemdgen.go +++ b/pkg/systemd/generate/systemdgen.go @@ -101,10 +101,10 @@ Before={{- range $index, $value := .RequiredServices -}}{{if $index}} {{end}}{{ Environment={{.EnvVariable}}=%n Restart={{.RestartPolicy}} {{- if .New}} -ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid +ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-ctr-id ExecStart={{.RunCommand}} -ExecStop={{.Executable}} stop --ignore --cidfile %t/%n-cid {{if (ge .StopTimeout 0)}}-t {{.StopTimeout}}{{end}} -ExecStopPost={{.Executable}} rm --ignore -f --cidfile %t/%n-cid +ExecStop={{.Executable}} stop --ignore --cidfile %t/%n-ctr-id {{if (ge .StopTimeout 0)}}-t {{.StopTimeout}}{{end}} +ExecStopPost={{.Executable}} rm --ignore -f --cidfile %t/%n-ctr-id PIDFile=%t/%n-pid {{- else}} ExecStart={{.Executable}} start {{.ContainerName}} @@ -168,7 +168,7 @@ func CreateContainerSystemdUnit(info *ContainerInfo, opts Options) (string, erro info.Executable, "run", "--conmon-pidfile", "%t/%n-pid", - "--cidfile", "%t/%n-cid", + "--cidfile", "%t/%n-ctr-id", "--cgroups=no-conmon", } |