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.
This commit is contained in:
Franck Bui 2020-09-15 11:49:09 +02:00 committed by Lennart Poettering
parent b7b7ace4ea
commit e66d2eeeeb
1 changed files with 1 additions and 1 deletions

View 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);
}