return unit_add_two_dependencies(tu, UNIT_AFTER, UNIT_WANTS, UNIT(am), true);
} else {
- if (!noauto && handle)
+ /* Automatically add mount points that aren't natively
+ * configured to local-fs.target */
+ if (!noauto &&
+ handle &&
+ !m->from_fragment)
if (user || m->meta.manager->running_as == MANAGER_SYSTEM)
if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m), true)) < 0)
return r;
if ((r = manager_load_unit(s->meta.manager, SPECIAL_SWAP_TARGET, NULL, NULL, &tu)) < 0)
return r;
- if (!p->noauto && (p->handle || s->meta.manager->swap_auto) && s->meta.manager->running_as == MANAGER_SYSTEM)
+ if (!p->noauto &&
+ (p->handle || s->meta.manager->swap_auto) &&
+ !s->from_fragment &&
+ s->meta.manager->running_as == MANAGER_SYSTEM)
if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(s), true)) < 0)
return r;