Como listar todos os serviços que começam após determinados serviços no systemd

3

Gostaria de encontrar desta forma (se possível) quais serviços esperam que o NetworkManager-wait-online.service seja executado antes de iniciar?

    
por S.R. 12.08.2017 / 21:59

1 resposta

5

Acho que o comando que você está procurando é:

$ systemctl list-dependencies --reverse NetworkManager-wait-online.service 
NetworkManager-wait-online.service
● └─network-online.target
●   └─hddtemp.service

De 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.
    
por Byte Commander 12.08.2017 / 22:19