mirror of
https://github.com/systemd/systemd.git
synced 2025-03-14 04:58:28 +03:00
mount: set up local-fs.target/remote-fs.target deps in mount_add_default_dependencies() too
This deps are very similar to the -pre deps, hence establish them at the same place, in particular as they should only be generated if default deps are on. This allows us to later on remove similar code that adds in these deps whenever /proc/self/mountinfo changes.
This commit is contained in:
parent
32a5f8fe22
commit
d54bab90e6
@ -423,10 +423,10 @@ static bool mount_is_extrinsic(Mount *m) {
|
||||
}
|
||||
|
||||
static int mount_add_default_dependencies(Mount *m) {
|
||||
const char *after, *before;
|
||||
UnitDependencyMask mask;
|
||||
int r;
|
||||
MountParameters *p;
|
||||
const char *after;
|
||||
int r;
|
||||
|
||||
assert(m);
|
||||
|
||||
@ -468,8 +468,15 @@ static int mount_add_default_dependencies(Mount *m) {
|
||||
return r;
|
||||
|
||||
after = SPECIAL_REMOTE_FS_PRE_TARGET;
|
||||
} else
|
||||
before = SPECIAL_REMOTE_FS_TARGET;
|
||||
} else {
|
||||
after = SPECIAL_LOCAL_FS_PRE_TARGET;
|
||||
before = SPECIAL_LOCAL_FS_TARGET;
|
||||
}
|
||||
|
||||
r = unit_add_dependency_by_name(UNIT(m), UNIT_BEFORE, before, true, mask);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after, true, mask);
|
||||
if (r < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user