X Tutup
Skip to content

Commit 433cfaf

Browse files
authored
Merge pull request systemd#20598 from tomty89/order_noauto
fstab-generator, core/mount: Avoid special fs target before dependency only if nofail is used
2 parents 74d99c3 + 195baa1 commit 433cfaf

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/core/mount.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,6 @@ static MountParameters* get_mount_parameters(Mount *m) {
8484
return get_mount_parameters_fragment(m);
8585
}
8686

87-
static bool mount_is_automount(const MountParameters *p) {
88-
assert(p);
89-
90-
return fstab_test_option(p->options,
91-
"comment=systemd.automount\0"
92-
"x-systemd.automount\0");
93-
}
94-
9587
static bool mount_is_network(const MountParameters *p) {
9688
assert(p);
9789

@@ -484,7 +476,7 @@ static int mount_add_default_ordering_dependencies(
484476
before = SPECIAL_LOCAL_FS_TARGET;
485477
}
486478

487-
if (!mount_is_nofail(m) && !mount_is_automount(p)) {
479+
if (!mount_is_nofail(m)) {
488480
r = unit_add_dependency_by_name(UNIT(m), UNIT_BEFORE, before, true, mask);
489481
if (r < 0)
490482
return r;

src/fstab-generator/fstab-generator.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,7 @@ static int add_mount(
436436

437437
/* Order the mount unit we generate relative to the post unit, so that DefaultDependencies= on the
438438
* target unit won't affect us. */
439-
if (post && !FLAGS_SET(flags, MOUNT_AUTOMOUNT) && !FLAGS_SET(flags, MOUNT_NOAUTO) &&
440-
!FLAGS_SET(flags, MOUNT_NOFAIL))
439+
if (post && !FLAGS_SET(flags, MOUNT_NOFAIL))
441440
fprintf(f, "Before=%s\n", post);
442441

443442
if (passno != 0) {

0 commit comments

Comments
 (0)
X Tutup