mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-02 09:47:03 +03:00
target: if the user configured a manual ordering between target units and the unit they require don't contradict that automatically
This commit is contained in:
parent
ad780f1991
commit
772a599e4f
8
fixme
8
fixme
@ -39,7 +39,7 @@
|
||||
|
||||
* timeout waiting for mount devices?
|
||||
|
||||
* default logic for serial getty, ck logging, ssk readahead
|
||||
* default logic for serial getty, ck logging, ssh readahead
|
||||
|
||||
* place /etc/inittab with explaining blurb.
|
||||
|
||||
@ -59,12 +59,14 @@
|
||||
|
||||
* /etc must always take precedence even if we follow symlinks!
|
||||
|
||||
* when adding default deps to targets, check if they are already there and skip
|
||||
|
||||
* /lib/init/rw
|
||||
|
||||
* vielleicht implizit immer auf syslog dependen?
|
||||
|
||||
* für selinux muss der socket wissen was für service geexeced wird.
|
||||
|
||||
* debian deadlock when partition auf noauto is.
|
||||
|
||||
External:
|
||||
|
||||
* patch /etc/init.d/functions with:
|
||||
|
21
src/target.c
21
src/target.c
@ -55,18 +55,23 @@ static int target_add_default_dependencies(Target *t) {
|
||||
Unit *other;
|
||||
int r;
|
||||
|
||||
/* Imply ordering for requirement dependencies
|
||||
* on target units. */
|
||||
/* Imply ordering for requirement dependencies on target
|
||||
* units. Note that when the user created a contradicting
|
||||
* ordering manually we won't add anything in here to make
|
||||
* sure we don't create a loop. */
|
||||
|
||||
SET_FOREACH(other, t->meta.dependencies[UNIT_REQUIRES], i)
|
||||
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
|
||||
return r;
|
||||
if (!set_get(t->meta.dependencies[UNIT_BEFORE], other))
|
||||
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
|
||||
return r;
|
||||
SET_FOREACH(other, t->meta.dependencies[UNIT_REQUIRES_OVERRIDABLE], i)
|
||||
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
|
||||
return r;
|
||||
if (!set_get(t->meta.dependencies[UNIT_BEFORE], other))
|
||||
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
|
||||
return r;
|
||||
SET_FOREACH(other, t->meta.dependencies[UNIT_WANTS], i)
|
||||
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
|
||||
return r;
|
||||
if (!set_get(t->meta.dependencies[UNIT_BEFORE], other))
|
||||
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
|
||||
return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user