Skip to content

Commit 4b66e5a

Browse files
committed
Add R! to systemd-tmpfiles script for all /tmp dirs
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 <[email protected]>
1 parent 2499de2 commit 4b66e5a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

contrib/tmpfile/podman.conf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# /tmp/podman-run-* directory can contain content for Podman containers that have run
2-
# for many days. This following line prevents systemd from removing this content.
2+
# for many days. The following lines prevents systemd from removing this content.
3+
# At the same time, these directories must also be cleaned on reboot.
4+
# Thus, each path has two lines: x to not periodically clean, R! to recursively
5+
# remove on reboot.
36
x /tmp/podman-run-*
7+
R! /tmp/podman-run-*
48
x /tmp/storage-run-*
9+
R! /tmp/storage-run-*
510
x /tmp/containers-user-*
11+
R! /tmp/containers-user-*
612
x /tmp/run-*/libpod
13+
R! /tmp/run-*/libpod
714
D! /var/lib/containers/storage/tmp 0700 root root
815
D! /run/podman 0700 root root
916
D! /var/lib/cni/networks

0 commit comments

Comments
 (0)