summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/automount.c3
-rw-r--r--src/path.c6
-rw-r--r--src/socket.c6
-rw-r--r--src/timer.c6
4 files changed, 18 insertions, 3 deletions
diff --git a/src/automount.c b/src/automount.c
index 462f3170ba..b45cbcf533 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -154,6 +154,9 @@ static int automount_add_default_dependencies(Automount *a) {
if (a->meta.manager->running_as == MANAGER_SYSTEM) {
+ if ((r = unit_add_dependency_by_name(UNIT(a), UNIT_BEFORE, SPECIAL_BASIC_TARGET, NULL, true)) < 0)
+ return r;
+
if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
return r;
}
diff --git a/src/path.c b/src/path.c
index 1d6f98cfbd..f62157e801 100644
--- a/src/path.c
+++ b/src/path.c
@@ -106,9 +106,13 @@ static int path_add_default_dependencies(Path *p) {
assert(p);
- if (p->meta.manager->running_as == MANAGER_SYSTEM)
+ if (p->meta.manager->running_as == MANAGER_SYSTEM) {
+ if ((r = unit_add_dependency_by_name(UNIT(p), UNIT_BEFORE, SPECIAL_BASIC_TARGET, NULL, true)) < 0)
+ return r;
+
if ((r = unit_add_two_dependencies_by_name(UNIT(p), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
+ }
return unit_add_two_dependencies_by_name(UNIT(p), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
diff --git a/src/socket.c b/src/socket.c
index 6d2df95813..9662066c13 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -301,9 +301,13 @@ static int socket_add_default_dependencies(Socket *s) {
int r;
assert(s);
- if (s->meta.manager->running_as == MANAGER_SYSTEM)
+ if (s->meta.manager->running_as == MANAGER_SYSTEM) {
+ if ((r = unit_add_dependency_by_name(UNIT(s), UNIT_BEFORE, SPECIAL_SOCKETS_TARGET, NULL, true)) < 0)
+ return r;
+
if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
+ }
return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
diff --git a/src/timer.c b/src/timer.c
index 065e9c14db..6f1f02ddbc 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -78,9 +78,13 @@ static int timer_add_default_dependencies(Timer *t) {
assert(t);
- if (t->meta.manager->running_as == MANAGER_SYSTEM)
+ if (t->meta.manager->running_as == MANAGER_SYSTEM) {
+ if ((r = unit_add_dependency_by_name(UNIT(t), UNIT_BEFORE, SPECIAL_BASIC_TARGET, NULL, true)) < 0)
+ return r;
+
if ((r = unit_add_two_dependencies_by_name(UNIT(t), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
+ }
return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}