1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-23 10:50:16 +03:00

Merge pull request #20598 from tomty89/order_noauto

fstab-generator, core/mount: Avoid special fs target before dependency only if nofail is used
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-12-11 14:06:38 +01:00 committed by GitHub
commit 433cfaf038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 11 deletions

View File

@ -84,14 +84,6 @@ static MountParameters* get_mount_parameters(Mount *m) {
return get_mount_parameters_fragment(m);
}
static bool mount_is_automount(const MountParameters *p) {
assert(p);
return fstab_test_option(p->options,
"comment=systemd.automount\0"
"x-systemd.automount\0");
}
static bool mount_is_network(const MountParameters *p) {
assert(p);
@ -484,7 +476,7 @@ static int mount_add_default_ordering_dependencies(
before = SPECIAL_LOCAL_FS_TARGET;
}
if (!mount_is_nofail(m) && !mount_is_automount(p)) {
if (!mount_is_nofail(m)) {
r = unit_add_dependency_by_name(UNIT(m), UNIT_BEFORE, before, true, mask);
if (r < 0)
return r;

View File

@ -436,8 +436,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) {