naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
87d178
From 55df2fd634f900419b718ed354132cc86cd533dd Mon Sep 17 00:00:00 2001
87d178
From: Joerg Behrmann <behrmann@physik.fu-berlin.de>
87d178
Date: Tue, 10 Mar 2020 16:34:13 +0100
87d178
Subject: [PATCH] docs: Add syntax for templated units to systemd.preset man
87d178
 page
87d178
87d178
This documents the syntax
87d178
87d178
     enable template@.service foo bar baz
87d178
87d178
that was introduced in #9901 to preset templated units.
87d178
87d178
(cherry picked from commit 1f667d8a7cff4355cd23ebebeb4d7179e3498eb8)
87d178
87d178
Related: #1812972
87d178
---
87d178
 man/systemd.preset.xml | 18 ++++++++++++++++--
87d178
 1 file changed, 16 insertions(+), 2 deletions(-)
87d178
87d178
diff --git a/man/systemd.preset.xml b/man/systemd.preset.xml
87d178
index cf807bd4c8..df401f00f3 100644
87d178
--- a/man/systemd.preset.xml
87d178
+++ b/man/systemd.preset.xml
87d178
@@ -71,8 +71,11 @@
87d178
     either the word <literal>enable</literal> or
87d178
     <literal>disable</literal> followed by a space and a unit name
87d178
     (possibly with shell style wildcards), separated by newlines.
87d178
-    Empty lines and lines whose first non-whitespace character is # or
87d178
-    ; are ignored.</para>
87d178
+    Empty lines and lines whose first non-whitespace character is <literal>#</literal> or
87d178
+    <literal>;</literal> are ignored. Multiple instance names for unit
87d178
+    templates may be specified as a space separated list at the end of
87d178
+    the line instead of the customary position between <literal>@</literal>
87d178
+    and the unit suffix.</para>
87d178
 
87d178
     <para>Presets must refer to the "real" unit file, and not to any aliases. See
87d178
     <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
87d178
@@ -124,6 +127,17 @@ disable *</programlisting>
87d178
     <literal>99-</literal>, it will be read last and hence can easily
87d178
     be overridden by spin or administrator preset policy.</para>
87d178
 
87d178
+    <example>
87d178
+      <title>Enable multiple template instances</title>
87d178
+
87d178
+      <programlisting># /usr/lib/systemd/system-preset/80-dirsrv.preset
87d178
+
87d178
+enable dirsrv@.service foo bar baz</programlisting>
87d178
+    </example>
87d178
+
87d178
+    <para>This enables all three of <filename>dirsrv@foo.service</filename>,
87d178
+    <filename>dirsrv@bar.service</filename> and <filename>dirsrv@baz.service</filename>.</para>
87d178
+
87d178
     <example>
87d178
       <title>A GNOME spin</title>
87d178