chiark / gitweb /
tmpfiles: get rid of "m" lines, make them redundant by "z"
[elogind.git] / man / tmpfiles.d.xml
index 475bcc766f4a31d0ab6d4cfece693927b36b1fa2..76cae39aae4345583ccbd3aef69e529eab603a81 100644 (file)
                 temporary files and directories which usually reside
                 in directories such as <filename>/run</filename>
                 or <filename>/tmp</filename>.</para>
+
+                <para>Volatile and temporary files and directories are
+                those located in <filename>/run</filename> (and its
+                alias <filename>/var/run</filename>),
+                <filename>/tmp</filename>,
+                <filename>/var/tmp</filename>, the API file systems
+                such as <filename>/sys</filename> or
+                <filename>/proc</filename>, as well as some other
+                directories below <filename>/var</filename>.</para>
+
+                <para>System daemons frequently require private
+                runtime directories below <filename>/run</filename> to
+                place communication sockets and similar in. For these,
+                consider declaring them in their unit files using
+                <varname>RuntimeDirectory=</varname>
+                (see <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details),
+                if this is feasible.</para>
         </refsect1>
 
         <refsect1>
 d    /run/user   0755 root root 10d -
 L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
 
-
                 <refsect2>
                         <title>Type</title>
 
@@ -168,14 +184,8 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
                                 </varlistentry>
 
                                 <varlistentry>
-                                        <term><varname>m</varname></term>
-                                        <listitem><para>If the
-                                        specified file path exists,
-                                        adjust its access mode, group
-                                        and user to the specified
-                                        values and reset the SELinux
-                                        label. If it does not exist, do
-                                        nothing.</para></listitem>
+                                        <term><varname>C</varname></term>
+                                        <listitem><para>Recursively copy a file or directory, if the destination files or directories don't exist yet.</para></listitem>
                                 </varlistentry>
 
                                 <varlistentry>
@@ -241,27 +251,29 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
 
                                 <varlistentry>
                                         <term><varname>z</varname></term>
-                                        <listitem><para>Restore
-                                        SELinux security context label
-                                        and set ownership and access
-                                        mode of a file or directory if
-                                        it exists.  Lines of this type
-                                        accept shell-style globs in
-                                        place of normal path names.
+                                        <listitem><para>Adjust the
+                                        access mode, group and user,
+                                        and restore the SELinux security
+                                        context of a file or directory,
+                                        if it exists. Lines of this
+                                        type accept shell-style globs
+                                        in place of normal path names.
                                         </para></listitem>
                                 </varlistentry>
 
                                 <varlistentry>
                                         <term><varname>Z</varname></term>
                                         <listitem><para>Recursively
-                                        restore SELinux security
-                                        context label and set
-                                        ownership and access mode of a
-                                        path and all its
-                                        subdirectories (if it is a
-                                        directory). Lines of this type
-                                        accept shell-style globs in
-                                        place of normal path
+                                        set the access mode, group and
+                                        user, and restore the SELinux
+                                        security context of a file or
+                                        directory if it exists, as
+                                        well as of its subdirectories
+                                        and the files contained
+                                        therein (if applicable). Lines
+                                        of this type accept
+                                        shell-style globs in place of
+                                        normal path
                                         names.</para></listitem>
                                 </varlistentry>
                         </variablelist>
@@ -273,20 +285,18 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
                         execute at any time, e.g. on package upgrades.
                         <command>systemd-tmpfiles</command> will
                         execute line with an exclamation mark only if
-                        option <option>--unsafe</option> is given.
+                        option <option>--boot</option> is given.
                         </para>
 
                         <para>For example:
-                        <programlisting>
-# Make sure these are created by default so that nobody else can
+                        <programlisting># Make sure these are created by default so that nobody else can
 d /tmp/.X11-unix 1777 root root 10d
 
 # Unlink the X11 lock files
-r! /tmp/.X[0-9]*-lock
-                        </programlisting>
+r! /tmp/.X[0-9]*-lock</programlisting>
                         The second line in contrast to the first one
                         would break a running system, and will only be
-                        executed with <option>--unsafe</option>.</para>
+                        executed with <option>--boot</option>.</para>
                 </refsect2>
 
                 <refsect2>
@@ -432,8 +442,10 @@ r! /tmp/.X[0-9]*-lock
                         <varname>f</varname>, <varname>F</varname>,
                         and <varname>w</varname> may be used to
                         specify a short string that is written to the
-                        file, suffixed by a newline. Ignored for all
-                        other lines.</para>
+                        file, suffixed by a newline. For
+                        <varname>C</varname> specifies the source file
+                        or directory. Ignored for all other
+                        lines.</para>
                 </refsect2>
 
         </refsect1>
@@ -444,8 +456,8 @@ r! /tmp/.X[0-9]*-lock
                         <title>/etc/tmpfiles.d/screen.conf example</title>
                         <para><command>screen</command> needs two directories created at boot with specific modes and ownership.</para>
 
-                        <programlisting>d /var/run/screens  1777 root root 10d
-d /var/run/uscreens 0755 root root 10d12h</programlisting>
+                        <programlisting>d /run/screens  1777 root root 10d
+d /run/uscreens 0755 root root 10d12h</programlisting>
                 </example>
                 <example>
                         <title>/etc/tmpfiles.d/abrt.conf example</title>
@@ -461,7 +473,8 @@ x /var/tmp/abrt/*</programlisting>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>
         </refsect1>