-
- /* Now, follow the same logic, but look for a template */
- if (u->meta.load_state == UNIT_STUB && u->meta.instance) {
- char *k;
-
- if (!(k = unit_name_template(u->meta.id)))
- return -ENOMEM;
-
- r = load_from_path(u, k);
- free(k);
-
- if (r < 0)
- return r;
-
- if (u->meta.load_state == UNIT_STUB)
- SET_FOREACH(t, u->meta.names, i) {
-
- if (t == u->meta.id)
- continue;
-
- if (!(k = unit_name_template(t)))
- return -ENOMEM;
-
- r = load_from_path(u, k);
- free(k);
-
- if (r < 0)
- return r;
-
- if (u->meta.load_state != UNIT_STUB)
- break;
- }
- }