Quadlet - fix pod service file name

Using replaceExtension breaks when the service name has a dot
Just add .service

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
This commit is contained in:
Ygal Blum 2023-12-03 09:53:52 +02:00
parent bc124dd13f
commit 0d260bdc1f
1 changed files with 1 additions and 1 deletions

View File

@ -1260,7 +1260,7 @@ func ConvertPod(podUnit *parser.UnitFile, name string, podsInfoMap map[string]*P
}
service := podUnit.Dup()
service.Filename = replaceExtension(podInfo.ServiceName, ".service", "", "")
service.Filename = fmt.Sprintf("%s.service", podInfo.ServiceName)
if podUnit.Path != "" {
service.Add(UnitGroup, "SourcePath", podUnit.Path)