]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: create /sys/fs/cgroup for unified hierarchy as well 1510/head
authorMirco Tischler <mt-ml@gmx.de>
Fri, 9 Oct 2015 11:12:08 +0000 (13:12 +0200)
committerMirco Tischler <mt-ml@gmx.de>
Fri, 9 Oct 2015 11:12:08 +0000 (13:12 +0200)
src/nspawn/nspawn-mount.c

index 3d302ef9ad040d9ce4382b669b383413784b725e..6c8b1d7a2651fcaec73539b6757944a13e446a35 100644 (file)
@@ -710,13 +710,15 @@ static int mount_unified_cgroups(const char *dest) {
 
         assert(dest);
 
-        p = strjoina(dest, "/sys/fs/cgroup");
+        p = prefix_roota(dest, "/sys/fs/cgroup");
+
+        (void) mkdir_p(p, 0755);
 
         r = path_is_mount_point(p, AT_SYMLINK_FOLLOW);
         if (r < 0)
                 return log_error_errno(r, "Failed to determine if %s is mounted already: %m", p);
         if (r > 0) {
-                p = strjoina(dest, "/sys/fs/cgroup/cgroup.procs");
+                p = prefix_roota(dest, "/sys/fs/cgroup/cgroup.procs");
                 if (access(p, F_OK) >= 0)
                         return 0;
                 if (errno != ENOENT)