]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab-generator: add 'nofail' when NFS 'bg' option is used
authorFranck Bui <fbui@suse.com>
Tue, 15 Sep 2020 09:49:09 +0000 (11:49 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 15 Sep 2020 14:24:01 +0000 (16:24 +0200)
Otherwise a 'Before=remote-fs.target' dependency is added to the mount unit
which defeats the purpose of 'bg' option.

src/fstab-generator/fstab-generator.c

index 91581aed3057afaa72d7fa2082275cbed724ceb2..6c560d547b20cb784da94a20ad2cc1b84049b06e 100644 (file)
@@ -425,7 +425,7 @@ static int add_mount(
                  * the systemd mount-timeout doesn't interfere.
                  * By placing these options first, they can be over-ridden by
                  * settings in /etc/fstab. */
-                opts = strjoina("x-systemd.mount-timeout=infinity,retry=10000,", opts, ",fg");
+                opts = strjoina("x-systemd.mount-timeout=infinity,retry=10000,nofail,", opts, ",fg");
                 SET_FLAG(flags, NOFAIL, true);
         }