mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
fstab-generator: properly order generated mount units before "post" target units
Let's make sure, that our mount unit are properly ordered before the "post" target unit even if DefaultDependencies= is used on the target unit.
This commit is contained in:
parent
e19ae92af6
commit
fa138f5e26
@ -433,6 +433,11 @@ static int add_mount(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
/* Order the mount unit we generate relative to the post unit, so that DefaultDependencies= on the
|
||||
* target unit won't affect us. */
|
||||
if (post && !FLAGS_SET(flags, AUTOMOUNT) && !FLAGS_SET(flags, NOAUTO))
|
||||
fprintf(f, "Before=%s\n", post);
|
||||
|
||||
if (passno != 0) {
|
||||
r = generator_write_fsck_deps(f, dest, what, where, fstype);
|
||||
if (r < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user