summaryrefslogtreecommitdiffstats
path: root/man/systemd.special.xml
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2024-10-01 11:30:18 +0200
committerLennart Poettering <lennart@poettering.net>2024-10-02 18:25:03 +0200
commit67b6404b80cf8078f3d9ec6d4c2f34ac25b15077 (patch)
tree9b32840b37786716ec29e694c5cf1ed22569cff2 /man/systemd.special.xml
parentMerge pull request #34616 from DaanDeMeyer/mkosi (diff)
downloadsystemd-67b6404b80cf8078f3d9ec6d4c2f34ac25b15077.tar.xz
systemd-67b6404b80cf8078f3d9ec6d4c2f34ac25b15077.zip
man: using WantedBy=default.target is not a good idea
We had several users, that wrote their unit files with WantedBy=default.target because it should be started "every time". But for example in Fedora/CentOS/RHEL, this often breaks for example selinux relabels (where we just want to do a relabel and reboot).
Diffstat (limited to 'man/systemd.special.xml')
-rw-r--r--man/systemd.special.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
index 192d09732a..5fa4baed20 100644
--- a/man/systemd.special.xml
+++ b/man/systemd.special.xml
@@ -240,6 +240,11 @@
names like <varname>single</varname>, <varname>rescue</varname>, <varname>1</varname>,
<varname>3</varname>, <varname>5</varname>, …; see
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
+
+ <para>For typical unit files please set <literal>WantedBy=</literal> to a regular target (like
+ <filename>multi-user.target</filename> or <filename>graphical.target</filename>),
+ instead of <filename>default.target</filename>, since such a service will also be run on special
+ boots like on system update, emergency boot…</para>
</listitem>
</varlistentry>
<varlistentry>