aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/systemd/generate/containers.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go
index c0a49c614..a4b18ec88 100644
--- a/pkg/systemd/generate/containers.go
+++ b/pkg/systemd/generate/containers.go
@@ -394,6 +394,10 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
info.IdentifySpecifier = true
runIx := -1
nameIx := -1
+ // Add systemd identify specifier next to the name value
+ // to set a name to the container according to the parameters passed to systemd.
+ // In case no --name set for that container, use ServiceName specified
+ // in the containerInfo struct.
for argIx, arg := range startCommand {
if arg == "run" {
runIx = argIx