mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-07 17:17:44 +03:00
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).
(cherry picked from commit 67b6404b80cf8078f3d9ec6d4c2f34ac25b15077)
(cherry picked from commit adc57cd81c02e5afc8efcbc64eb3a6305a97c62c)
(cherry picked from commit 02447d2888
)
This commit is contained in:
parent
7b9f8e99f3
commit
3f7bf5ac5f
@ -230,6 +230,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>
|
||||
|
Loading…
Reference in New Issue
Block a user