1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-31 14:50:15 +03:00

fstab-generator: also order noauto or automount mount units before "post" target units

The ordering should not prevent noauto or automount from working
as expected, and we do not want them to be stopped too early if
they are active.
This commit is contained in:
Tom Yan 2021-08-31 20:48:51 +08:00
parent 50dbb118c9
commit 3b78db59d0

View File

@ -434,8 +434,7 @@ static int add_mount(
/* 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, MOUNT_AUTOMOUNT) && !FLAGS_SET(flags, MOUNT_NOAUTO) &&
!FLAGS_SET(flags, MOUNT_NOFAIL))
if (post && !FLAGS_SET(flags, MOUNT_NOFAIL))
fprintf(f, "Before=%s\n", post);
if (passno != 0) {