}
} else if (startswith(t, "Required-Start:") ||
- startswith(t, "Should-Start:")) {
+ startswith(t, "Should-Start:") ||
+ startswith(t, "X-Start-Before:") ||
+ startswith(t, "X-Start-After:")) {
char *i, *w;
size_t z;
if (r == 0)
continue;
- r = unit_add_dependency_by_name(u, UNIT_AFTER, m, NULL, true);
+ r = unit_add_dependency_by_name(u, startswith(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER, m, NULL, true);
free(m);
if (r < 0)
/* Make sure we don't enter a busy loop of some kind. */
if (!ratelimit_test(&s->ratelimit)) {
log_warning("%s start request repeated too quickly, refusing to start.", u->meta.id);
- service_enter_dead(s, false, true);
return -ECANCELED;
}