From abcb67ceed56a722b9cf352fa27b4ba0076280c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 11 Dec 2018 19:09:48 +0100 Subject: [PATCH] man: rewrite the general description of tmpfiles We would describe tmpfiles.d through what systemd-tmpfiles does with them, but I think it's better to start with a geneneral statement what they are. Also, let's make the description of volatile file systems less prominent. Also, strenghten the advice to use RuntimeDirectory and mention {Cache,Logs,Configuration,State}Directory=. --- man/tmpfiles.d.xml | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 3cca3d27b73..5be96b8e9af 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -40,22 +40,33 @@ Description - systemd-tmpfiles uses the configuration - files from the above directories to describe the creation, - cleaning and removal of volatile and temporary files and - directories which usually reside in directories such as - /run or /tmp. - - Volatile and temporary files and directories are those located in /run, - /tmp, /var/tmp, the API file systems such as /sys or - /proc, as well as some other directories below /var. - - System daemons frequently require private runtime - directories below /run to place communication - sockets and similar in. For these, consider declaring them in - their unit files using RuntimeDirectory= (see - systemd.exec5 - for details), if this is feasible. + tmpfiles.d configuration files provide a generic mechanism to define the + creation of regular files, directories, pipes, and device nodes, adjustments to + their access mode, ownership, attributes, quota assignments, and contents, and + finally their time-based removal. It is mostly commonly used for volatile and + temporary files and directories (such as those located under /run, + /tmp, /var/tmp, the API file systems such as + /sys or /proc, as well as some other directories below + /var). + + systemd-tmpfiles uses this configuration to create volatile files and + directories during boot and to do periodic cleanup afterwards. See + systemd-tmpfiles5 for + the description of systemd-tmpfiles-setup.service, + systemd-tmpfiles-cleanup.service, and associated units. + + System daemons frequently require private runtime directories below /run to + store communication sockets and similar. For these, is is better to use + RuntimeDirectory= in their unit files (see + systemd.exec5 for + details), if the flexibility provided by tmpfiles.d is not required. The advantages + are that the configuration required by the unit is centralized in one place, and that the lifetime of the + directory is tied to the lifetime of the service itself. Similarly, StateDirectory=, + CacheDirectory=, LogsDirectory=, and + ConfigurationDirectory= should be used to create directories under + /var/lib/, /var/cache/, /var/log/, and + /etc/. tmpfiles.d should be used for files whose lifetime is + independent of any service or requires more complicated configuration. -- 2.47.3