システム化された注文サイクル

システム化された注文サイクル

誰かが私にこれの正しい方向を教えてくれることを願っています。

以下の「journalctl -u sshd」エントリに基づいてsshd.serviceが起動しないようにする新しいシステムパスユニット(以下を参照)があります。

私が何か間違っていることは明らかですが、何を間違っているのかわかりません。助けてください! :-)

事前にありがとう

雑誌:

Oct 10 17:08:28 host1.example.local systemd[1]: multi-user.target: Found ordering cycle on sshd.service/start
Oct 10 17:08:28 host1.example.local systemd[1]: multi-user.target: Found dependency on sshd-keygen.target/start
Oct 10 17:08:28 host1.example.local systemd[1]: multi-user.target: Found dependency on [email protected]
Oct 10 17:08:28 host1.example.local systemd[1]: multi-user.target: Found dependency on basic.target/start
Oct 10 17:08:28 host1.example.local systemd[1]: multi-user.target: Found dependency on paths.target/start
Oct 10 17:08:28 host1.example.local systemd[1]: multi-user.target: Found dependency on path-watch.path/start
Oct 10 17:08:28 host1.example.local systemd[1]: multi-user.target: Found dependency on multi-user.target/start
Oct 10 17:08:28 host1.example.local systemd[1]: multi-user.target: Job sshd.service/start deleted to break ordering cycle starting with multi-user.target/start

パス単位ファイル:

[Unit]
Description=Watch for changes (updates) to /mypath
Wants=network-online.target
After=multi-user.target

[Path] 
PathChanged=/mypath/

[Install]
WantedBy=multi-user.target

編集:また、単に「XYZリストからより良い答えを得ることができます」以外の場所に投稿することは非常に感謝します。

ベストアンサー1

私が考える問題の核心はBefore=パス単位は自動的に paths.target に型依存性を持ちます。、デバイスが効果的に起動するように構成されています。今後 paths.targetそして後ろに multi-user.target(電子は非常に速く、後者は非常に遅いので不可能です。)人気はないようですが、そのセクションで設定してみることができDefaultDependencies=noます[Unit]。指定されたソート関係を持つためにパス単位が実際に必要かどうかを検討することをお勧めしますmulti-user.target

おすすめ記事