chiark / gitweb /
units: introduce umount.target for unmounting all file systems
[elogind.git] / src / mount.c
index 498732eef18d5c49b38d23600a21d4627676f79c..57c258f9f255908b86eba0d664f7b68fd2e76407 100644 (file)
@@ -367,6 +367,10 @@ static int mount_load(Unit *u) {
 
                 if ((r = unit_add_default_cgroup(u)) < 0)
                         return r;
+
+                if (m->meta.default_dependencies && !path_equal(m->where, "/"))
+                        if ((r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
+                                return r;
         }
 
         return mount_verify(m);