]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab-generator: also order noauto or automount mount units before "post" target...
authorTom Yan <tom.ty89@gmail.com>
Tue, 31 Aug 2021 12:48:51 +0000 (20:48 +0800)
committerTom Yan <tom.ty89@gmail.com>
Wed, 1 Sep 2021 16:38:25 +0000 (00:38 +0800)
The ordering should not prevent noauto or automount from working
as expected, and we do not want them to be stopped too early if
they are active.

src/fstab-generator/fstab-generator.c

index 8a4340c5ba9290d0e5571f34855ee72a77efe3f4..fd7fc30da3a145921b3536636398eb3c9f88e6b2 100644 (file)
@@ -434,8 +434,7 @@ static int add_mount(
 
         /* Order the mount unit we generate relative to the post unit, so that DefaultDependencies= on the
          * target unit won't affect us. */
-        if (post && !FLAGS_SET(flags, MOUNT_AUTOMOUNT) && !FLAGS_SET(flags, MOUNT_NOAUTO) &&
-            !FLAGS_SET(flags, MOUNT_NOFAIL))
+        if (post && !FLAGS_SET(flags, MOUNT_NOFAIL))
                 fprintf(f, "Before=%s\n", post);
 
         if (passno != 0) {