From dc7621a571b79d7fead93790c01c82c7c5789c8f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 27 Dec 2016 23:42:53 +0100 Subject: 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 --- tmpfiles.d/tmp.conf | 4 ++++ 1 file changed, 4 insertions(+) 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-* -- cgit v1.2.3