mirror of
https://github.com/containers/podman.git
synced 2025-09-19 23:03:16 +08:00

We already used `x` in tmpfiles, to ensure systemd did not remove our directories or clean their contents (we really need them to be left unmodified). However, systemd-tmpfiles lets us use more than one directive per line, which means we can safely add an R! (recursive remove on reboot) to these lines to ensure that, if /tmp is not a tmpfs, systemd-tmpfiles will still remove our temporary files, ensuring reboots are still accurately detected. Signed-off-by: Matt Heon <mheon@redhat.com>
20 lines
778 B
Plaintext
20 lines
778 B
Plaintext
# /tmp/podman-run-* directory can contain content for Podman containers that have run
|
|
# for many days. The following lines prevents systemd from removing this content.
|
|
# At the same time, these directories must also be cleaned on reboot.
|
|
# Thus, each path has two lines: x to not periodically clean, R! to recursively
|
|
# remove on reboot.
|
|
x /tmp/podman-run-*
|
|
R! /tmp/podman-run-*
|
|
x /tmp/storage-run-*
|
|
R! /tmp/storage-run-*
|
|
x /tmp/containers-user-*
|
|
R! /tmp/containers-user-*
|
|
x /tmp/run-*/libpod
|
|
R! /tmp/run-*/libpod
|
|
D! /var/lib/containers/storage/tmp 0700 root root
|
|
D! /run/podman 0700 root root
|
|
D! /var/lib/cni/networks
|
|
# Remove /var/tmp/container_images* podman temporary directories on each
|
|
# boot which are created when pulling or saving images.
|
|
R! /var/tmp/container_images*
|