I would like to find in this way (if possible) which services wait for NetworkManager-wait-online.service to execute before they start?
Asked
Active
Viewed 1.1k times
1 Answers
8
I think the command you are looking for is:
$ systemctl list-dependencies --reverse NetworkManager-wait-online.service
NetworkManager-wait-online.service
● └─network-online.target
● └─hddtemp.service
From man systemctl
:
list-dependencies [NAME]
Shows units required and wanted by the specified unit. This
recursively lists units following the Requires=, Requisite=,
ConsistsOf=, Wants=, BindsTo= dependencies. If no unit is
specified, default.target is implied.
By default, only target units are recursively expanded. When --all
is passed, all other units are recursively expanded as well.
Options --reverse, --after, --before may be used to change what
types of dependencies are shown.
--reverse
Show reverse dependencies between units with list-dependencies,
i.e. follow dependencies of type WantedBy=, RequiredBy=, PartOf=,
BoundBy=, instead of Wants= and similar.

Byte Commander
- 107,489
--after
shows all other units that specified to start the mentioned one after themselves. You are either looking for--reverse
or maybe--before
, which shows all units before which the mentioned one needs to be started. – Byte Commander Aug 12 '17 at 20:51