]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/systemctl/systemctl.c
core: when loading .wants and .requires, follow the same logic as .d conf dropins
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 5 Feb 2017 01:50:44 +0000 (20:50 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 8 Feb 2017 02:31:22 +0000 (21:31 -0500)
commit957787821008f5823804c928c9cdc77bb3910027
treec46828e6d7fd4a9a36522bfcc3a76d0d012d2ea7
parent5dd11ab5f36ce71138005941ea69458e169b3af6
core: when loading .wants and .requires, follow the same logic as .d conf dropins

Essentially, instead of sequentially adding deps based on all symlinks
encountered in .wants and .requires dirs for each name and each unit file load
path, iteratate over the load paths and unit names gathering symlinks, then
order them based on priority, and then iterate over the final list, adding
dependencies.

This patch doesn't change the logic too much, except that the order in which
dependencies are applied might be different. It wasn't defined before, so that
not really a change. Adding filtering on the symlinks is left for later
patches.
src/core/load-dropin.c
src/core/load-dropin.h
src/shared/dropin.c
src/shared/dropin.h
src/systemctl/systemctl.c