diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-07 12:17:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 12:17:41 +0200 |
commit | eaf53b6bb8d24b533ca4ca0f45ae69abd1086fdd (patch) | |
tree | 9c23888f7a38bcd4c4be7a5dbd1e1155b612b55a /pkg/systemd/generate/common.go | |
parent | aca6ef01d8bd265fb5343cf9b8a212f6073a2095 (diff) | |
parent | 9ac5267598c3665eb152bf73afba14495b9674f4 (diff) | |
download | podman-eaf53b6bb8d24b533ca4ca0f45ae69abd1086fdd.tar.gz podman-eaf53b6bb8d24b533ca4ca0f45ae69abd1086fdd.tar.bz2 podman-eaf53b6bb8d24b533ca4ca0f45ae69abd1086fdd.zip |
Merge pull request #10557 from vrothberg/fix-5572
systemd/generate: change type to notify
Diffstat (limited to 'pkg/systemd/generate/common.go')
-rw-r--r-- | pkg/systemd/generate/common.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkg/systemd/generate/common.go b/pkg/systemd/generate/common.go index 1ee070888..e183125a7 100644 --- a/pkg/systemd/generate/common.go +++ b/pkg/systemd/generate/common.go @@ -60,7 +60,7 @@ func filterPodFlags(command []string, argCount int) []string { return processed } -// filterCommonContainerFlags removes --conmon-pidfile, --cidfile and --cgroups from the specified command. +// filterCommonContainerFlags removes --sdnotify, --rm and --cgroups from the specified command. // argCount is the number of last arguments which should not be filtered, e.g. the container entrypoint. func filterCommonContainerFlags(command []string, argCount int) []string { processed := []string{} @@ -68,11 +68,14 @@ func filterCommonContainerFlags(command []string, argCount int) []string { s := command[i] switch { - case s == "--conmon-pidfile", s == "--cidfile", s == "--cgroups": + case s == "--rm": + // Boolean flags support --flag and --flag={true,false}. + continue + case s == "--sdnotify", s == "--cgroups": i++ continue - case strings.HasPrefix(s, "--conmon-pidfile="), - strings.HasPrefix(s, "--cidfile="), + case strings.HasPrefix(s, "--sdnotify="), + strings.HasPrefix(s, "--rm="), strings.HasPrefix(s, "--cgroups="): continue } |