summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-20 00:06:25 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-20 09:00:39 -0400
commitdf8dee85da5fa41e95dd7f536e67fcc6940a6488 (patch)
tree1dee59d17084f4b485198f74286ce702f6c59b0b /man
parent4b743d679bfa8a39760f936344392001e8768e21 (diff)
tmpfiles: add new 'e' action which cleans up a dir without creating it
I wanted to add a config line that would empty a directory without creating it if doesn't exist. Existing actions don't allow this. v2: properly add 'e' to needs_glob() and takes_ownership()
Diffstat (limited to 'man')
-rw-r--r--man/tmpfiles.d.xml22
1 files changed, 21 insertions, 1 deletions
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index cd6d7f626c..957475d2bd 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -168,6 +168,12 @@
of the directory will be removed when <option>--remove</option> is used.
</para></listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><varname>e</varname></term>
+ <listitem><para>Similar to <varname>d</varname>, but the directory will not be
+ created if it does not exist. Lines of this type accept shell-style globs in
+ place of normal path names.</para></listitem>
</varlistentry>
<varlistentry>
@@ -581,7 +587,7 @@
unconditionally.</para>
<para>The age field only applies to lines starting with
- <varname>d</varname>, <varname>D</varname>,
+ <varname>d</varname>, <varname>D</varname>, <varname>e</varname>,
<varname>v</varname>, <varname>q</varname>,
<varname>Q</varname>, <varname>C</varname>, <varname>x</varname>
and <varname>X</varname>. If omitted or set to
@@ -658,7 +664,21 @@ d /var/tmp 1777 root root 30d
<programlisting># /usr/lib/tmpfiles.d/abrt.conf
d /var/tmp/abrt 0755 abrt abrt -
</programlisting>
+ </example>
+
+ <example>
+ <title>Apply clean up during boot and based on time</title>
+
+ <programlisting># /usr/lib/tmpfiles.d/dnf.conf
+r! /var/cache/dnf/*/*/download_lock.pid
+r! /var/cache/dnf/*/*/metadata_lock.pid
+r! /var/lib/dnf/rpmdb_lock.pid
+e /var/chache/dnf/ - - - 30d
+</programlisting>
+ <para>The lock files will be removed during boot. Any files and directories in
+ <filename>/var/chache/dnf/</filename> will be removed after they have not been
+ accessed in 30 days.</para>
</example>
</refsect1>