Skip to content

Commit

Permalink
Remove ExecStartPre from generated services
Browse files Browse the repository at this point in the history
  • Loading branch information
riyad committed Dec 29, 2022
1 parent cc9724b commit 9b12b52
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,6 @@ fn convert_container(container: &SystemdUnit) -> Result<SystemdUnit, ConversionE
"%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.append_entry(
SERVICE_SECTION,
"ExecStartPre",
"-rm -f %t/%N.cid",
);

// If the conman exited uncleanly it may not have removed the container, so force it,
// -i makes it ignore non-existing files.
service.append_entry(
Expand Down Expand Up @@ -257,9 +248,6 @@ fn convert_container(container: &SystemdUnit) -> Result<SystemdUnit, ConversionE
// On clean shutdown, remove container
podman.add("--rm");

// Detach from container, we don't need the podman process to hang around
podman.add("-d");

// But we still want output to the journal, so use the log driver.
podman.add_slice(&["--log-driver", "passthrough"]);

Expand Down

0 comments on commit 9b12b52

Please sign in to comment.