diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 3cca3d27b7..5be96b8e9a 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. + 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). - 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. + 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 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. + 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.