summaryrefslogtreecommitdiff
path: root/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-29 03:18:09 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-29 03:18:09 +0100
commitf50e0a012340fa8dfe6ec7f0cd869f5f3a052d7a (patch)
tree79ef58ce7acbc8dffcb0af8284a0f4e5922bbe88 /load-fragment.c
parentb08d03ffe58332f590aae5c78a85e4fc0b8588ce (diff)
implement coldpluggin
Diffstat (limited to 'load-fragment.c')
-rw-r--r--load-fragment.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/load-fragment.c b/load-fragment.c
index 94bdf171af..0cdaaa204a 100644
--- a/load-fragment.c
+++ b/load-fragment.c
@@ -807,10 +807,11 @@ static int load_from_path(Unit *u, const char *path) {
goto finish;
+ if (id == k)
+ unit_choose_id(u, id);
free(k);
}
- unit_choose_id(u, id);
free(u->meta.load_path);
u->meta.load_path = filename;
@@ -860,10 +861,10 @@ int unit_load_fragment(Unit *u) {
/* If syslog or kernel logging is requested, make sure
* our own logging daemon is run first. */
- if ((k = unit_add_dependency(u, UNIT_AFTER, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0)
+ if ((k = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_LOGGER_SOCKET)) < 0)
return k;
- if ((k = unit_add_dependency(u, UNIT_REQUIRES, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0)
+ if ((k = unit_add_dependency_by_name(u, UNIT_REQUIRES, SPECIAL_LOGGER_SOCKET)) < 0)
return k;
}