summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2023-05-16 21:53:24 +0800
committerGitHub <noreply@github.com>2023-05-16 21:53:24 +0800
commit0313c41068a362178190eac81f64b60223bb4c0c (patch)
tree859c0475b13cc7dac6edb15fcfce44286deee0ce /man
parent3907b2563855f42562643fd26e9dec515d4ef928 (diff)
parentb5b1351317db64de1f2c944ec153208ba8174079 (diff)
downloadsystemd-0313c41068a362178190eac81f64b60223bb4c0c.tar.gz
Merge pull request #27638 from YHNdnzj/upheldby-unit-file
unit-file: support UpheldBy= in [Install] settings (adding Upholds= deps from .upholds/)
Diffstat (limited to 'man')
-rw-r--r--man/systemctl.xml9
-rw-r--r--man/systemd.unit.xml39
2 files changed, 26 insertions, 22 deletions
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 51ac818195..e3776fb277 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -367,10 +367,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<listitem>
<para>Shows units required and wanted by the specified
units. This recursively lists units following the
- <varname>Requires=</varname>,
- <varname>Requisite=</varname>,
- <varname>ConsistsOf=</varname>,
- <varname>Wants=</varname>, <varname>BindsTo=</varname>
+ <varname>Requires=</varname>, <varname>Requisite=</varname>,
+ <varname>Wants=</varname>, <varname>ConsistsOf=</varname>,
+ <varname>BindsTo=</varname>, and <varname>Upholds=</varname>
dependencies. If no units are specified,
<filename>default.target</filename> is implied.</para>
@@ -1791,7 +1790,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<para>Show reverse dependencies between units with
<command>list-dependencies</command>, i.e. follow
dependencies of type <varname>WantedBy=</varname>,
- <varname>RequiredBy=</varname>,
+ <varname>RequiredBy=</varname>, <varname>UpheldBy=</varname>,
<varname>PartOf=</varname>, <varname>BoundBy=</varname>,
instead of <varname>Wants=</varname> and similar.
</para>
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index c618e403f7..e28bfe845e 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -749,8 +749,7 @@
<para>When <varname>Upholds=b.service</varname> is used on <filename>a.service</filename>, this
dependency will show as <varname>UpheldBy=a.service</varname> in the property listing of
- <filename>b.service</filename>. The <varname>UpheldBy=</varname> dependency cannot be specified
- directly.</para>
+ <filename>b.service</filename>.</para>
</listitem>
</varlistentry>
@@ -1849,6 +1848,12 @@
<entry>[Install] section</entry>
</row>
<row>
+ <entry><varname>Upholds=</varname></entry>
+ <entry><varname>UpheldBy=</varname></entry>
+ <entry>[Unit] section</entry>
+ <entry>[Install] section</entry>
+ </row>
+ <row>
<entry><varname>PartOf=</varname></entry>
<entry><varname>ConsistsOf=</varname></entry>
<entry>[Unit] section</entry>
@@ -1895,10 +1900,10 @@
</tgroup>
</table>
- <para>Note: <varname>WantedBy=</varname> and <varname>RequiredBy=</varname> are
- used in the [Install] section to create symlinks in <filename>.wants/</filename>
- and <filename>.requires/</filename> directories. They cannot be used directly as a
- unit configuration setting.</para>
+ <para>Note: <varname>WantedBy=</varname>, <varname>RequiredBy=</varname>, and <varname>UpheldBy=</varname>
+ are used in the [Install] section to create symlinks in <filename>.wants/</filename>,
+ <filename>.requires/</filename>, and <filename>.upholds/</filename> directories. They cannot be used
+ directly as a unit configuration setting.</para>
<para>Note: <varname>ConsistsOf=</varname>, <varname>BoundBy=</varname>,
<varname>RequisiteOf=</varname>, <varname>ConflictedBy=</varname> are created
@@ -1947,23 +1952,23 @@
<varlistentry>
<term><varname>WantedBy=</varname></term>
<term><varname>RequiredBy=</varname></term>
+ <term><varname>UpheldBy=</varname></term>
<listitem><para>This option may be used more than once, or a space-separated list of unit names may
- be given. A symbolic link is created in the <filename>.wants/</filename> or
- <filename>.requires/</filename> directory of each of the listed units when this unit is installed by
- <command>systemctl enable</command>. This has the effect of a dependency of type
- <varname>Wants=</varname> or <varname>Requires=</varname> being added from the listed unit to the
- current unit. The primary result is that the current unit will be started when the listed unit is
- started, see the description of <varname>Wants=</varname> and <varname>Requires=</varname> in the
- [Unit] section for details.</para>
+ be given. A symbolic link is created in the <filename>.wants/</filename>, <filename>.requires/</filename>,
+ or <filename>.upholds/</filename> directory of each of the listed units when this unit is installed
+ by <command>systemctl enable</command>. This has the effect of a dependency of type
+ <varname>Wants=</varname>, <varname>Requires=</varname>, or <varname>Upholds=</varname> being added
+ from the listed unit to the current unit. See the description of the mentioned dependency types
+ in the [Unit] section for details.</para>
<para>In case of template units listing non template units, the listing unit must have
<varname>DefaultInstance=</varname> set, or <command>systemctl enable</command> must be called with
an instance name. The instance (default or specified) will be added to the
- <filename>.wants/</filename> or <filename>.requires/</filename> list of the listed unit. For example,
- <command>WantedBy=getty.target</command> in a service <filename>getty@.service</filename> will result
- in <command>systemctl enable getty@tty2.service</command> creating a
- <filename>getty.target.wants/getty@tty2.service</filename> link to
+ <filename>.wants/</filename>, <filename>.requires/</filename>, or <filename>.upholds/</filename>
+ list of the listed unit. For example, <command>WantedBy=getty.target</command> in a service
+ <filename>getty@.service</filename> will result in <command>systemctl enable getty@tty2.service</command>
+ creating a <filename>getty.target.wants/getty@tty2.service</filename> link to
<filename>getty@.service</filename>. This also applies to listing specific instances of templated
units: this specific instance will gain the dependency. A template unit may also list a template
unit, in which case a generic dependency will be added where each instance of the listing unit will