Автор Тема: Зависание при выключении (systemctl poweroff) [КОСТЫЛЬ]  (Прочитано 6358 раз)

Оффлайн ASte

  • Мастер
  • ***
  • Сообщений: 1 566
Цитировать
Интересно, а может ли systemd останавливать сервисы в определенном порядке?..
Порядок запуска сервисов systemd определяется через afrer=.. в юните сервиса.
Останавливаются сервисы вроде-бы в обратном порядке. Вот что нагуглил по этому поводу:
Цитировать
Before=, After=

    A space-separated list of unit names. Configures ordering dependencies between units. If a unit foo.service contains a setting Before=bar.service and both units are being started, bar.service's start-up is delayed until foo.service is started up. Note that this setting is independent of and orthogonal to the requirement dependencies as configured by Requires=. It is a common pattern to include a unit name in both the After= and Requires= option, in which case the unit listed will be started before the unit that is configured with these options. This option may be specified more than once, in which case ordering dependencies for all listed names are created. After= is the inverse of Before=, i.e. while After= ensures that the configured unit is started after the listed unit finished starting up, Before= ensures the opposite, i.e. that the configured unit is fully started up before the listed unit is started. Note that when two units with an ordering dependency between them are shut down, the inverse of the start-up order is applied. i.e. if a unit is configured with After= on another unit, the former is stopped before the latter if both are shut down. If one unit with an ordering dependency on another unit is shut down while the latter is started up, the shut down is ordered before the start-up regardless of whether the ordering dependency is actually of type After= or Before=. If two units have no ordering dependencies between them, they are shut down or started up simultaneously, and no ordering takes place.

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 361
  • Учиться .... Телепатами не рождаются, ими ....
Интересно, а может ли systemd останавливать сервисы в определенном порядке?..

Вот тут целая глва посвящена отладки выключения
http://www2.kangran.su/~nnz/pub/s4a/s4a_latest.pdf

Оффлайн mrs

  • Участник
  • *
  • Сообщений: 138
  • Paragraf 8
Останавливаются сервисы вроде-бы в обратном порядке. Вот что нагуглил по этому поводу:

... Note that when two units with an ordering dependency between them are shut down, the inverse of the start-up order is applied. ...
ну, значит сервисы в стартеркитах неполностью сконфигурированы (пока перезагружал комп, заметил, что последовательность остановки разная)... хотя, может это и не важно, и в данном случае lightdm может не подходит для этой версии systemd (он там в логах ругался на что-то)... или вообще проблема где-то в другом месте.

Вот тут целая глва посвящена отладки выключения
спасибо, почитаю на досуге)

а сейчас наверное все-таки переустановлю систему, попробую другой стартеркит, скажем с xfce-окружением.