summaryrefslogtreecommitdiff
path: root/pkg/systemd/generate/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/systemd/generate/common.go')
-rw-r--r--pkg/systemd/generate/common.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/systemd/generate/common.go b/pkg/systemd/generate/common.go
index e809b4837..4f995be96 100644
--- a/pkg/systemd/generate/common.go
+++ b/pkg/systemd/generate/common.go
@@ -34,3 +34,17 @@ Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
`
+
+// filterPodFlags removes --pod and --pod-id-file from the specified command.
+func filterPodFlags(command []string) []string {
+ processed := []string{}
+ for i := 0; i < len(command); i++ {
+ s := command[i]
+ if s == "--pod" || s == "--pod-id-file" {
+ i += 1
+ continue
+ }
+ processed = append(processed, s)
+ }
+ return processed
+}