chiark / gitweb /
job: start job timer when we begin running the job, not already when we add it to...
[elogind.git] / src / mount.c
index 1f311cee41cf3f243d4b0c3cb703411956fd4e99..88b54bbb2913a1057f03471c35e07c5cce3aa081 100644 (file)
@@ -306,7 +306,7 @@ static int mount_add_target_links(Mount *m) {
                 return r;
 
         if (after)
-                if ((r = unit_add_dependency_by_name(tu, UNIT_AFTER, after, NULL, true)) < 0)
+                if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after, NULL, true)) < 0)
                         return r;
 
         if (automount && m->meta.manager->running_as == MANAGER_SYSTEM) {
@@ -466,6 +466,9 @@ static int mount_load(Unit *u) {
 
         /* This is a new unit? Then let's add in some extras */
         if (u->meta.load_state == UNIT_LOADED) {
+                if ((r = unit_add_exec_dependencies(u, &m->exec_context)) < 0)
+                        return r;
+
                 if (m->meta.fragment_path)
                         m->from_fragment = true;