16.10.2019 19:18, Michael Hirmke пишет:
Hi *,
is there any parameter for systemctl or any other command, that allows me to list all units depending on ConditionACPower=true?
If you mean - all unit definitions - then grep -rl ConditionACPower=true /usr/lib/systemd/system will catch most of them (see documentation for full list of directories in unit search path). if you mean - currently loaded units - you will need to write your own D-Bus parser: Conditions [unit property] contains all configured conditions of the unit. For each condition five fields are given: condition type (e.g. ConditionPathExists), whether the condition is a trigger condition, whether the condition is reversed, the right hand side of the condtion (e.g. the path in case of ConditionPathExists), and the status. The status can be 0, in which case the condition hasn't been checked yet, a positive value, in which case the condition passed, or a negative value, in which case the condition failed. Currently only 0, +1, and -1 are used, but additional values may be used in the future, retaining the meaning of zero/positive/negative values. See https://www.freedesktop.org/wiki/Software/systemd/dbus/ -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org