From e66d2eeeeb4332ca94aeb62e95ec76f1f17ee9b7 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 15 Sep 2020 11:49:09 +0200 Subject: [PATCH] fstab-generator: add 'nofail' when NFS 'bg' option is used 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 91581aed305..6c560d547b2 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -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); } -- 2.39.2