/* Drop Debian-style .sh suffix */
strcpy(stpcpy(r, name) - 3, ".service");
#ifdef TARGET_ARCH
- else if (startswith(name, "@"))
- /* Drop Arch-style background prefix */
- strcpy(stpcpy(r, name + 1), ".service");
+ else if (startswith(name, "@"))
+ /* Drop Arch-style background prefix */
+ strcpy(stpcpy(r, name + 1), ".service");
#endif
else
/* Normal init scripts */
if (s == t)
continue;
+ if (t->meta.load_state != UNIT_LOADED)
+ continue;
+
if (t->sysv_start_priority < 0)
continue;
if (u->meta.description)
return u->meta.description;
- return u->meta.id;
+ return strna(u->meta.id);
}
void unit_dump(Unit *u, FILE *f, const char *prefix) {
assert(d >= 0 && d < _UNIT_DEPENDENCY_MAX);
assert(other);
+ u = unit_follow_merge(u);
+ other = unit_follow_merge(other);
+
/* We won't allow dependencies on ourselves. We will not
* consider them an error however. */
if (u == other)