diff options
author | Danilo Krummrich <danilo.krummrich@bmw.de> | 2021-06-14 17:46:00 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-22 15:54:10 +0900 |
commit | 678f2b16676cd566c50bdec78350f732a9a3ee41 (patch) | |
tree | 9ccea2693aa03b61766f8597f2a459a701d34d2f /shell-completion | |
parent | d8b50e5df7e01983279e70c6d970fb60d053df97 (diff) | |
download | systemd-678f2b16676cd566c50bdec78350f732a9a3ee41.tar.gz |
udevadm: trigger: implement --initialized-match/nomatch arguments
systemd-udev-trigger.service by default triggeres all devices regardless
of whether they were already recognized by systemd-udevd.
There are machines (especially in embedded environments) where
systemd-udev-trigger.service is configured to run at a later stage of
the boot sequence, which can lead to quite a lot of devices being
triggered although they were already recognized by systemd-udevd.
Re-triggering a lot of devices is a relatively expensive operation and
therefore should be avoided if unnecessary.
Therefore this patch introduces --initialized-nomatch, which filters out
devices that are already present in the udev database. For consistance
reasons --initialized-match is implemented as well, which filters out devices
that are *not* already present in the udev database.
Replaces #19949.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/udevadm | 3 | ||||
-rw-r--r-- | shell-completion/zsh/_udevadm | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/shell-completion/bash/udevadm b/shell-completion/bash/udevadm index 4d52597cbf..23ce02365c 100644 --- a/shell-completion/bash/udevadm +++ b/shell-completion/bash/udevadm @@ -51,7 +51,8 @@ _udevadm() { [INFO_STANDALONE]='-r --root -a --attribute-walk -x --export -e --export-db -c --cleanup-db -w --wait-for-initialization --value' [INFO_ARG]='-q --query -p --path -n --name -P --export-prefix -d --device-id-of-file --property' - [TRIGGER_STANDALONE]='-v --verbose -n --dry-run -q --quiet -w --settle --wait-daemon --uuid' + [TRIGGER_STANDALONE]='-v --verbose -n --dry-run -q --quiet -w --settle --wait-daemon --uuid + --initialized-match --initialized-nomatch' [TRIGGER_ARG]='-t --type -c --action -s --subsystem-match -S --subsystem-nomatch -a --attr-match -A --attr-nomatch -p --property-match -g --tag-match -y --sysname-match --name-match -b --parent-match diff --git a/shell-completion/zsh/_udevadm b/shell-completion/zsh/_udevadm index 8a10237e3d..63df8b7c9e 100644 --- a/shell-completion/zsh/_udevadm +++ b/shell-completion/zsh/_udevadm @@ -34,6 +34,8 @@ _udevadm_trigger(){ '--tag-match=property[Trigger events for devices with a matching tag.]' \ '--sysname-match=[Trigger events for devices with a matching sys device name.]' \ '--parent-match=[Trigger events for all children of a given device.]' \ + '--initialized-match[Trigger events for devices that are already initialized.]' \ + '--initialized-nomatch[Trigger events for devices that are not initialized yet.]' \ '--uuid[Print synthetic uevent UUID.]' \ '--prioritized-subsystem=[Trigger events for devices which belong to a matching subsystem earlier.]' } |