]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
portable: make use of the new unit file path
authorLennart Poettering <lennart@poettering.net>
Mon, 8 Oct 2018 15:24:00 +0000 (17:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 8 Oct 2018 16:49:45 +0000 (18:49 +0200)
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

index 3491723aa144200fa0f5f17a43b09555db6e4b06..03eeb111ce86637cfd9bec7c43fd1e5745765da6 100644 (file)
@@ -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)