From 40a7b232deb0bf3f8ec2d9ab009714597f84a30b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 8 Oct 2018 17:24:00 +0200 Subject: [PATCH] portable: make use of the new unit file path Note that this breaks compatibility with older versions, as the detach code won't find unit files attached with older releases anymore. But given that the portable service logic was not deemed stable so far, and this was explicitly documented and enforced through portablectl's installation to /usr/lib/systemd/ such a compat breakage should be fine. --- src/portable/portable.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/portable/portable.c b/src/portable/portable.c index 3491723aa14..03eeb111ce8 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -815,15 +815,15 @@ static int install_profile_dropin( return 0; } -static const char *config_path(const LookupPaths *paths, PortableFlags flags) { +static const char *attached_path(const LookupPaths *paths, PortableFlags flags) { const char *where; assert(paths); if (flags & PORTABLE_RUNTIME) - where = paths->runtime_config; + where = paths->runtime_attached; else - where = paths->persistent_config; + where = paths->persistent_attached; assert(where); return where; @@ -849,7 +849,7 @@ static int attach_unit_file( assert(m); assert(PORTABLE_METADATA_IS_UNIT(m)); - where = config_path(paths, flags); + where = attached_path(paths, flags); path = strjoina(where, "/", m->name); dropin_dir = strjoin(path, ".d"); @@ -1147,7 +1147,7 @@ int portable_detach( if (r < 0) return r; - where = config_path(&paths, flags); + where = attached_path(&paths, flags); d = opendir(where); if (!d) @@ -1314,7 +1314,7 @@ static int portable_get_state_internal( if (r < 0) return r; - where = config_path(&paths, flags); + where = attached_path(&paths, flags); d = opendir(where); if (!d) -- 2.47.3