summaryrefslogtreecommitdiff
path: root/pkg/systemd/generate/pods.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-17 10:34:11 +0100
committerGitHub <noreply@github.com>2022-03-17 10:34:11 +0100
commit6ce967708de95723df92084818274a76c1d7ae16 (patch)
treecf09301df89228e663fa68ef3947c1962fd92d51 /pkg/systemd/generate/pods.go
parentb1d37a7e21bfb3e12af2e7cee25dc88ac4f148dd (diff)
parent714e5a13d9586ac6a3a6a1ee1b2ec15a43058350 (diff)
downloadpodman-6ce967708de95723df92084818274a76c1d7ae16.tar.gz
podman-6ce967708de95723df92084818274a76c1d7ae16.tar.bz2
podman-6ce967708de95723df92084818274a76c1d7ae16.zip
Merge pull request #13299 from npate012/fix_systemd_generate_name_on_empty_prefix
Separator is no longer prepended when prefix is empty on podman generate systemd
Diffstat (limited to 'pkg/systemd/generate/pods.go')
-rw-r--r--pkg/systemd/generate/pods.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go
index 003c23e77..78ae6391b 100644
--- a/pkg/systemd/generate/pods.go
+++ b/pkg/systemd/generate/pods.go
@@ -242,7 +242,8 @@ func generatePodInfo(pod *libpod.Pod, options entities.GenerateSystemdOptions) (
nameOrID = pod.Name()
ctrNameOrID = infraCtr.Name()
}
- serviceName := fmt.Sprintf("%s%s%s", options.PodPrefix, options.Separator, nameOrID)
+
+ serviceName := getServiceName(options.PodPrefix, options.Separator, nameOrID)
info := podInfo{
ServiceName: serviceName,