summaryrefslogtreecommitdiff
path: root/tmpfiles.d/tmp.conf
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-27 23:42:53 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-27 23:54:02 +0100
commitdc7621a571b79d7fead93790c01c82c7c5789c8f (patch)
tree0a3d8b49859531fb5d2c45c41c9d77a7c4b4ad27 /tmpfiles.d/tmp.conf
parentd71f050599dfd63a53ef3e91a8ef1835a8985b92 (diff)
tmpfiles: automatically remove old private tmp dirs after reboot
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
Diffstat (limited to 'tmpfiles.d/tmp.conf')
-rw-r--r--tmpfiles.d/tmp.conf4
1 files changed, 4 insertions, 0 deletions
diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
index 6bbd1aa341..22555a0076 100644
--- a/tmpfiles.d/tmp.conf
+++ b/tmpfiles.d/tmp.conf
@@ -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-*