Revert "systemd: add a start job for all units specified with SYSTEMD_WANTS="

This reverts commit 043a559ff3732439fc61872a6320ee0a05dd088f.

This was a mistake, and was reverted upstream.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2014-02-23 12:41:54 +00:00
committed by Colin Guthrie
parent 07138cd296
commit 5d976fa2fa
+3 -11
View File
@@ -282,8 +282,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
size_t l;
FOREACH_WORD_QUOTED(w, l, wants, state) {
_cleanup_free_ char *e, *n = NULL;
Unit *other;
char *e, *n;
e = strndup(w, l);
if (!e) {
@@ -295,19 +294,12 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
r = -ENOMEM;
goto fail;
}
free(e);
r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);
free(n);
if (r < 0)
goto fail;
other = manager_get_unit(u->manager, n);
if (!other || !unit_can_start(other))
continue;
r = manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL);
if (r < 0)
log_warning("Failed to add job %s/%s, ignoring: %s.",
other->id, job_type_to_string(JOB_START), strerror(-r));
}
}
}