mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Merge pull request #9445 from jmguzik/no-header-info-for-systemd-generation
No header info for systemd generation
This commit is contained in:
@ -65,7 +65,8 @@ type containerInfo struct {
|
||||
ExecStop string
|
||||
// ExecStopPost of the unit.
|
||||
ExecStopPost string
|
||||
|
||||
// Removes autogenerated by Podman and timestamp if set to true
|
||||
GenerateNoHeader bool
|
||||
// If not nil, the container is part of the pod. We can use the
|
||||
// podInfo to extract the relevant data.
|
||||
Pod *podInfo
|
||||
@ -292,10 +293,15 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
|
||||
if info.PodmanVersion == "" {
|
||||
info.PodmanVersion = version.Version.String()
|
||||
}
|
||||
|
||||
if options.NoHeader {
|
||||
info.GenerateNoHeader = true
|
||||
info.GenerateTimestamp = false
|
||||
}
|
||||
|
||||
if info.GenerateTimestamp {
|
||||
info.TimeStamp = fmt.Sprintf("%v", time.Now().Format(time.UnixDate))
|
||||
}
|
||||
|
||||
// Sort the slices to assure a deterministic output.
|
||||
sort.Strings(info.BoundToServices)
|
||||
|
||||
|
Reference in New Issue
Block a user