]> git.ipfire.org Git - thirdparty/systemd.git/commit
fstab-generator: add x-systemd.before and x-systemd.after fstab options (#5330)
authorRuslan Bilovol <ruslan.bilovol@gmail.com>
Mon, 13 Feb 2017 19:50:22 +0000 (21:50 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 13 Feb 2017 19:50:22 +0000 (20:50 +0100)
commitae3251851aa64138f415567b0a0d0df143182803
tree4e176e7d029c7f1d01622371e3e3f37d03cfe755
parent53f7443a4302ca7950777f6140d7d87052a202d9
fstab-generator: add x-systemd.before and x-systemd.after fstab options (#5330)

Currently fstab entries with 'nofail' option are mounted
asynchronously and there is no way how to specify dependencies
between such fstab entry and another units. It means that
users are forced to write additional dependency units manually.

The patch introduces new systemd fstab options:

x-systemd.before=<PATH>
x-systemd.after=<PATH>

 - to specify another mount dependency (PATH is translated to unit name)

x-systemd.before=<UNIT>
x-systemd.after=<UNIT>

 - to specify arbitrary UNIT dependency

For example mount where A should be mounted before local-fs.target unit:

 /dev/sdb1    /mnt/test/A     none    nofail,x-systemd.before=local-fs.target
man/systemd.mount.xml
src/fstab-generator/fstab-generator.c