]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd.swap.xml
verify: use manager_load_startable_unit_or_warn() to load units for verification
[thirdparty/systemd.git] / man / systemd.swap.xml
index 69d4be4769a03ef733e12b998bc8e6a8a6326cb8..acedb9fb25e961d6e9bb7d9badbe8e8390f82442 100644 (file)
@@ -3,6 +3,8 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
+  SPDX-License-Identifier: LGPL-2.1+
+
   This file is part of systemd.
 
   Copyright 2010 Lennart Poettering
@@ -70,7 +72,7 @@
     <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
     which define the execution environment the <citerefentry
     project='man-pages'><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-    binary is executed in, in
+    program is executed in, in
     <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
     which define the way these processes are
     terminated, and in
     which configure resource control settings for these processes of the
     unit.</para>
 
-    <para>Swap units must be named after the devices
-    or files they control. Example: the swap device
-    <filename noindex='true'>/dev/sda5</filename> must be configured in a
-    unit file <filename>dev-sda5.swap</filename>. For details about
-    the escaping logic used to convert a file system path to a unit
-    name, see
-    <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+    <para>Swap units must be named after the devices or files they control. Example: the swap device <filename
+    noindex='true'>/dev/sda5</filename> must be configured in a unit file <filename>dev-sda5.swap</filename>. For
+    details about the escaping logic used to convert a file system path to a unit name, see
+    <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Note that swap
+    units cannot be templated, nor is possible to add multiple names to a swap unit by creating additional symlinks to
+    it.</para>
   </refsect1>
 
   <refsect1>
-    <title>Automatic Dependencies</title>
+    <title>Implicit Dependencies</title>
 
-    <para>All swap units automatically get the
-    <varname>BindsTo=</varname> and <varname>After=</varname>
-    dependencies on the device units or the mount units of the files
-    they are activated from.</para>
+    <para>The following dependencies are implicitly added:</para>
 
-    <para>Swap units with <varname>DefaultDependencies=</varname>
-    enabled implicitly acquire a <varname>Conflicts=</varname> and an
-    <varname>After=</varname> dependency on
-    <filename>umount.target</filename> so that they are deactivated at
-    shutdown, unless <varname>DefaultDependencies=no</varname> is
-    specified.</para>
+    <itemizedlist>
+      <listitem><para>All swap units automatically get the
+      <varname>BindsTo=</varname> and <varname>After=</varname>
+      dependencies on the device units or the mount units of the files
+      they are activated from.</para></listitem>
+    </itemizedlist>
 
     <para>Additional implicit dependencies may be added as result of
     execution and resource control parameters as documented in
     <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
   </refsect1>
 
+  <refsect1>
+    <title>Default Dependencies</title>
+
+    <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
+
+    <itemizedlist>
+      <listitem><para>Swap units automatically acquire a <varname>Conflicts=</varname> and a
+      <varname>Before=</varname> dependency on <filename>umount.target</filename> so that they are deactivated at
+      shutdown as well as a <varname>Before=swap.target</varname> dependency.</para></listitem>
+    </itemizedlist>
+  </refsect1>
+
   <refsect1>
     <title><filename>fstab</filename></title>
 
 
       <varlistentry>
         <term><varname>What=</varname></term>
-        <listitem><para>Takes an absolute path of a device node or
-        file to use for paging. See
-        <citerefentry project='man-pages'><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-        for details. If this refers to a device node, a dependency on
-        the respective device unit is automatically created. (See
-        <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-        for more information.) If this refers to a file, a dependency
-        on the respective mount unit is automatically created. (See
-        <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-        for more information.) This option is
-        mandatory.</para></listitem>
+        <listitem><para>Takes an absolute path of a device node or file to use for paging. See <citerefentry
+        project='man-pages'><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry> for
+        details. If this refers to a device node, a dependency on the respective device unit is automatically
+        created. (See
+        <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more
+        information.) If this refers to a file, a dependency on the respective mount unit is automatically
+        created. (See <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+        for more information.) This option is mandatory. Note that the usual specifier expansion is applied to this
+        setting, literal percent characters should hence be written as <literal>%%</literal>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
       <varlistentry>
         <term><varname>Options=</varname></term>
 
-        <listitem><para>May contain an option string for the swap
-        device. This may be used for controlling discard options among
-        other functionality, if the swap backing device supports the
-        discard or trim operation. (See
+        <listitem><para>May contain an option string for the swap device. This may be used for controlling discard
+        options among other functionality, if the swap backing device supports the discard or trim operation. (See
         <citerefentry project='man-pages'><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-        for more information.) </para></listitem>
+        for more information.) Note that the usual specifier expansion is applied to this setting, literal percent
+        characters should hence be written as <literal>%%</literal>.</para></listitem>
       </varlistentry>
 
       <varlistentry>