mirror of
https://github.com/containers/podman.git
synced 2025-06-27 13:38:49 +08:00
Merge pull request #16713 from alexlarsson/quadlet-drop-cid-remove
quadlet: Drop ExecStartPre=rm %t/%N.cid
This commit is contained in:
@ -223,11 +223,6 @@ func ConvertContainer(container *parser.UnitFile, isUser bool) (*parser.UnitFile
|
|||||||
// Need the containers filesystem mounted to start podman
|
// Need the containers filesystem mounted to start podman
|
||||||
service.Add(UnitGroup, "RequiresMountsFor", "%t/containers")
|
service.Add(UnitGroup, "RequiresMountsFor", "%t/containers")
|
||||||
|
|
||||||
// Remove any leftover cid file before starting, just to be sure.
|
|
||||||
// We remove any actual pre-existing container by name with --replace=true.
|
|
||||||
// But --cidfile will fail if the target exists.
|
|
||||||
service.Add(ServiceGroup, "ExecStartPre", "-rm -f %t/%N.cid")
|
|
||||||
|
|
||||||
// If the conman exited uncleanly it may not have removed the container, so force it,
|
// If the conman exited uncleanly it may not have removed the container, so force it,
|
||||||
// -i makes it ignore non-existing files.
|
// -i makes it ignore non-existing files.
|
||||||
service.Add(ServiceGroup, "ExecStopPost", "-/usr/bin/podman rm -f -i --cidfile=%t/%N.cid")
|
service.Add(ServiceGroup, "ExecStopPost", "-/usr/bin/podman rm -f -i --cidfile=%t/%N.cid")
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
## assert-key-is "Service" "Type" "notify"
|
## assert-key-is "Service" "Type" "notify"
|
||||||
## assert-key-is "Service" "NotifyAccess" "all"
|
## assert-key-is "Service" "NotifyAccess" "all"
|
||||||
## assert-key-is "Service" "SyslogIdentifier" "%N"
|
## assert-key-is "Service" "SyslogIdentifier" "%N"
|
||||||
## assert-key-is "Service" "ExecStartPre" "-rm -f %t/%N.cid"
|
|
||||||
## assert-key-is "Service" "ExecStopPost" "-/usr/bin/podman rm -f -i --cidfile=%t/%N.cid" "-rm -f %t/%N.cid"
|
## assert-key-is "Service" "ExecStopPost" "-/usr/bin/podman rm -f -i --cidfile=%t/%N.cid" "-rm -f %t/%N.cid"
|
||||||
## assert-key-is "Service" "Environment" "PODMAN_SYSTEMD_UNIT=%n"
|
## assert-key-is "Service" "Environment" "PODMAN_SYSTEMD_UNIT=%n"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user