]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/mount: also add default before dependency for automount mount units 20598/head
authorTom Yan <tom.ty89@gmail.com>
Tue, 31 Aug 2021 13:46:04 +0000 (21:46 +0800)
committerTom Yan <tom.ty89@gmail.com>
Wed, 1 Sep 2021 16:38:25 +0000 (00:38 +0800)
The dependency should not prevent automount from working as expected,
and we do not want them to be stopped too early if they are active.

src/core/mount.c

index 35b56426d4106b13bec5dc53fa974f5a633600cc..23ffabd60d9c84eeab80e646e2980b63949c3c9b 100644 (file)
@@ -84,14 +84,6 @@ static MountParameters* get_mount_parameters(Mount *m) {
         return get_mount_parameters_fragment(m);
 }
 
-static bool mount_is_automount(const MountParameters *p) {
-        assert(p);
-
-        return fstab_test_option(p->options,
-                                 "comment=systemd.automount\0"
-                                 "x-systemd.automount\0");
-}
-
 static bool mount_is_network(const MountParameters *p) {
         assert(p);
 
@@ -484,7 +476,7 @@ static int mount_add_default_ordering_dependencies(
                 before = SPECIAL_LOCAL_FS_TARGET;
         }
 
-        if (!mount_is_nofail(m) && !mount_is_automount(p)) {
+        if (!mount_is_nofail(m)) {
                 r = unit_add_dependency_by_name(UNIT(m), UNIT_BEFORE, before, true, mask);
                 if (r < 0)
                         return r;