daandemeyer / rpms / systemd

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