From: Zbigniew Jędrzejewski-Szmek Date: Tue, 11 Dec 2018 18:09:48 +0000 (+0100) Subject: man: rewrite the general description of tmpfiles X-Git-Tag: v240~83^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=abcb67ceed56a722b9cf352fa27b4ba0076280c5;p=thirdparty%2Fsystemd.git 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=. --- 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.