]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: automatically remove old private tmp dirs after reboot 4994/head
authorLennart Poettering <lennart@poettering.net>
Tue, 27 Dec 2016 22:42:53 +0000 (23:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Dec 2016 22:54:02 +0000 (23:54 +0100)
Let's automatically destory per-unit private temporary directories, as
they are created by PrivateTmp=yes on each boot, if we notice them to be
around, in case they are left-overs from the last boot.

Fixes: #4401
tmpfiles.d/tmp.conf

index 6bbd1aa341e529661862f7cbcaaa8f07b6a932a1..22555a0076d7fae9dbc59d783dfb453849df03b4 100644 (file)
@@ -16,3 +16,7 @@ x /tmp/systemd-private-%b-*
 X /tmp/systemd-private-%b-*/tmp
 x /var/tmp/systemd-private-%b-*
 X /var/tmp/systemd-private-%b-*/tmp
+
+# Remove top-level private temporary directories on each boot
+R! /tmp/systemd-private-*
+R! /var/tmp/systemd-private-*