From ea7a3a783f8c9f49f5aedae9574fd70d9c9074ec Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 26 Jan 2016 19:50:04 +0100 Subject: [PATCH 3/6] man: document that unit file globbing only operates on primary unit names See: #2397 (cherry picked from commit 1f00ededc7451933e23a95597804897b37fa88d6) Related: #1288851 --- man/systemctl.xml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/man/systemctl.xml b/man/systemctl.xml index 66a0900..50e8ce0 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -658,14 +658,11 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service Start (activate) one or more units specified on the command line. - Note that glob patterns operate on a list of currently - loaded units. Units which are not active and are not in a - failed state usually are not loaded, and would not be - matched by any pattern. In addition, in case of - instantiated units, systemd is often unaware of the - instance name until the instance has been started. Therefore, - using glob patterns with start - has limited usefulness. + Note that glob patterns operate on the set of primary names of currently loaded units. Units which + are not active and are not in a failed state usually are not loaded, and will not be matched by any + pattern. In addition, in case of instantiated units, systemd is often unaware of the instance name until + the instance has been started. Therefore, using glob patterns with start has limited + usefulness. Also, secondary alias names of units are not considered. @@ -1701,11 +1698,10 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service are equivalent to: # systemctl status dev-sda.device # systemctl status home.mount - In the second case, shell-style globs will be matched against - currently loaded units; literal unit names, with or without - a suffix, will be treated as in the first case. This means that - literal unit names always refer to exactly one unit, but globs - may match zero units and this is not considered an error. + In the second case, shell-style globs will be matched against the primary names of all currently loaded units; + literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit + names always refer to exactly one unit, but globs may match zero units and this is not considered an + error. Glob patterns use fnmatch3, @@ -1713,11 +1709,12 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service *, ?, [] may be used. See glob7 - 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 are silently skipped. For example: # systemctl stop sshd@*.service - will stop all sshd@.service instances. + will stop all sshd@.service instances. Note that alias names of units, and units that aren't + loaded are not considered for glob expansion. For unit file commands, the specified -- 2.5.0