mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
man: document that unit file globbing only operates on primary unit names
See: #2397
This commit is contained in:
parent
1b53f64b00
commit
1f00ededc7
@ -683,14 +683,11 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
|
|||||||
<para>Start (activate) one or more units specified on the
|
<para>Start (activate) one or more units specified on the
|
||||||
command line.</para>
|
command line.</para>
|
||||||
|
|
||||||
<para>Note that glob patterns operate on a list of currently
|
<para>Note that glob patterns operate on the set of primary names of currently loaded units. Units which
|
||||||
loaded units. Units which are not active and are not in a
|
are not active and are not in a failed state usually are not loaded, and will not be matched by any
|
||||||
failed state usually are not loaded, and would not be
|
pattern. In addition, in case of instantiated units, systemd is often unaware of the instance name until
|
||||||
matched by any pattern. In addition, in case of
|
the instance has been started. Therefore, using glob patterns with <command>start</command> has limited
|
||||||
instantiated units, systemd is often unaware of the
|
usefulness. Also, secondary alias names of units are not considered.</para>
|
||||||
instance name until the instance has been started. Therefore,
|
|
||||||
using glob patterns with <command>start</command>
|
|
||||||
has limited usefulness.</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -1724,11 +1721,10 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
|
|||||||
are equivalent to:
|
are equivalent to:
|
||||||
<programlisting># systemctl status dev-sda.device
|
<programlisting># systemctl status dev-sda.device
|
||||||
# systemctl status home.mount</programlisting>
|
# systemctl status home.mount</programlisting>
|
||||||
In the second case, shell-style globs will be matched against
|
In the second case, shell-style globs will be matched against the primary names of all currently loaded units;
|
||||||
currently loaded units; literal unit names, with or without
|
literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit
|
||||||
a suffix, will be treated as in the first case. This means that
|
names always refer to exactly one unit, but globs may match zero units and this is not considered an
|
||||||
literal unit names always refer to exactly one unit, but globs
|
error.</para>
|
||||||
may match zero units and this is not considered an error.</para>
|
|
||||||
|
|
||||||
<para>Glob patterns use
|
<para>Glob patterns use
|
||||||
<citerefentry project='man-pages'><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
@ -1736,11 +1732,12 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
|
|||||||
<literal>*</literal>, <literal>?</literal>,
|
<literal>*</literal>, <literal>?</literal>,
|
||||||
<literal>[]</literal> may be used. See
|
<literal>[]</literal> may be used. See
|
||||||
<citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
for more details. The patterns are matched against the names of
|
for more details. The patterns are matched against the primary names of
|
||||||
currently loaded units, and patterns which do not match anything
|
currently loaded units, and patterns which do not match anything
|
||||||
are silently skipped. For example:
|
are silently skipped. For example:
|
||||||
<programlisting># systemctl stop sshd@*.service</programlisting>
|
<programlisting># systemctl stop sshd@*.service</programlisting>
|
||||||
will stop all <filename>sshd@.service</filename> instances.
|
will stop all <filename>sshd@.service</filename> instances. Note that alias names of units, and units that aren't
|
||||||
|
loaded are not considered for glob expansion.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>For unit file commands, the specified
|
<para>For unit file commands, the specified
|
||||||
|
Loading…
Reference in New Issue
Block a user