]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: note that templated surviving units need a drop-in for their slice
authorLuca Boccassi <bluca@debian.org>
Thu, 6 Jun 2024 21:10:23 +0000 (22:10 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 7 Jun 2024 11:33:18 +0000 (12:33 +0100)
As reported on the mailing list, this is non-obvious, so document it.

https://lists.freedesktop.org/archives/systemd-devel/2024-June/050351.html

man/systemd-soft-reboot.service.xml

index 668b664513aa6632e1d071e7509c2bb1797ff7b3..9b29a5d68a7e9f674899cc6468ba02ccb9483592 100644 (file)
@@ -122,6 +122,17 @@ Type=oneshot
 ExecStart=sleep infinity</programlisting>
       </listitem>
 
+      <listitem><para>On top of the above, templated units also need a drop-in configuration file for their
+      slice, as they are by default ran inside a slice named after the non-templated part of the unit. For
+      example, for a <filename>foo@test.service</filename> instance configured with the default slice, a
+      drop-in <filename>system-foo.slice.d/survive.conf</filename> is required, with content:</para>
+
+      <programlisting>[Unit]
+SurviveFinalKillSignal=yes
+IgnoreOnIsolate=yes
+DefaultDependencies=no</programlisting>
+      </listitem>
+
       <listitem><para>File system mounts may remain mounted during the transition, and complex storage
       attached, if configured to remain until the very end of the shutdown process. (Also achieved via
       <varname>DefaultDependencies=no</varname>, and by avoiding