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