diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index 07feccb54a0..33d861a33f9 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -204,7 +204,11 @@ system that merges multiple mount points). See After= and Requires= in systemd.unit5 - for details. + for details. + + Note that this option always applies to the created mount unit + only regardless whether has been + specified. @@ -223,7 +227,11 @@ unit. See Before= and After= in systemd.unit5 - for details. + for details. + + Note that these options always apply to the created mount unit + only regardless whether has been + specified. diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 77b90e1a9b8..39e91a9c6b5 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -406,7 +406,7 @@ static int add_mount( SET_FLAG(flags, NOFAIL, true); } - if (!(flags & AUTOMOUNT) && opts) { + if (opts) { r = write_after(f, opts); if (r < 0) return r; @@ -530,21 +530,6 @@ static int add_mount( "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n", source); - if (opts) { - r = write_after(f, opts); - if (r < 0) - return r; - r = write_requires_after(f, opts); - if (r < 0) - return r; - r = write_before(f, opts); - if (r < 0) - return r; - r = write_requires_mounts_for(f, opts); - if (r < 0) - return r; - } - fprintf(f, "\n" "[Automount]\n"