From: Lennart Poettering Date: Wed, 28 Nov 2018 11:35:37 +0000 (+0100) Subject: mount: set up local-fs.target/remote-fs.target deps in mount_add_default_dependencies... X-Git-Tag: v240~112^2~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d54bab90;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/mount.c b/src/core/mount.c index 134349d6f99..94498bfc31c 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -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)