diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-01 12:45:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 12:45:11 -0500 |
commit | 182e8414d406d3058e985104af98f30a9e8f56fa (patch) | |
tree | 7ce06e9fab81e63476b43bcefa746520abdf7b91 /pkg/systemd/generate/pods.go | |
parent | 20183349fd2c6a9a569c6c79234af48bb5d92ff7 (diff) | |
parent | 5352df226bc3f345836e78b73063de91d34b4e85 (diff) | |
download | podman-182e8414d406d3058e985104af98f30a9e8f56fa.tar.gz podman-182e8414d406d3058e985104af98f30a9e8f56fa.tar.bz2 podman-182e8414d406d3058e985104af98f30a9e8f56fa.zip |
Merge pull request #9178 from Luap99/fix-9176
Fix podman generate systemd --new special char handling
Diffstat (limited to 'pkg/systemd/generate/pods.go')
-rw-r--r-- | pkg/systemd/generate/pods.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go index c7e3aa955..d6ede19af 100644 --- a/pkg/systemd/generate/pods.go +++ b/pkg/systemd/generate/pods.go @@ -269,7 +269,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions) return "", errors.Errorf("pod does not appear to be created via `podman pod create`: %v", info.CreateCommand) } podRootArgs = info.CreateCommand[1 : podCreateIndex-1] - info.RootFlags = strings.Join(quoteArguments(podRootArgs), " ") + info.RootFlags = strings.Join(escapeSystemdArguments(podRootArgs), " ") podCreateArgs = filterPodFlags(info.CreateCommand[podCreateIndex+1:]) } // We're hard-coding the first five arguments and append the @@ -306,7 +306,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions) } startCommand = append(startCommand, podCreateArgs...) - startCommand = quoteArguments(startCommand) + startCommand = escapeSystemdArguments(startCommand) info.ExecStartPre1 = "/bin/rm -f {{{{.PIDFile}}}} {{{{.PodIDFile}}}}" info.ExecStartPre2 = strings.Join(startCommand, " ") |