From 6349956dda41f4d40217cafb47ba79502b5f529f 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. (cherry picked from commit e66d2eeeeb4332ca94aeb62e95ec76f1f17ee9b7) (cherry picked from commit ad77a988f2ef7f8adb2b4d54b9fc37a48f6a52df) (cherry picked from commit a4bf35c2012e59aabb21e9866bb154badbb452b3) --- 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 6fd6fbdf1c..75f804c609 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -368,7 +368,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.25.1