summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2017-02-07 06:50:04 +0100
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:23:13 +0100
commitfac657c58ae86c747674391e477d9af043b29e2e (patch)
treec5c20ca550767856125719acae7c89009af6a096 /src/core
parent14dbe3476e6a5e03d928dc35f48577efea6baf57 (diff)
Remove src/basic/special.h, as all defines in there are systemd-only.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/cgroup.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 9b0339aae..b517415ce 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -24,7 +24,7 @@
#include "process-util.h"
#include "path-util.h"
-#include "special.h"
+// #include "special.h"
#include "cgroup-util.h"
#include "cgroup.h"
@@ -1233,6 +1233,8 @@ int manager_setup_cgroup(Manager *m) {
if (r < 0)
return log_error_errno(r, "Cannot determine cgroup we are running in: %m");
+/// elogind does not support systemd scopes and slices
+#if 0
/* Chop off the init scope, if we are already located in it */
e = endswith(m->cgroup_root, "/" SPECIAL_INIT_SCOPE);
@@ -1247,6 +1249,7 @@ int manager_setup_cgroup(Manager *m) {
}
if (e)
*e = 0;
+#endif // 0
/* And make sure to store away the root value without trailing
* slash, even for the root dir, so that we can easily prepend
@@ -1313,9 +1316,15 @@ int manager_setup_cgroup(Manager *m) {
log_debug("Release agent already installed.");
}
+/// elogind is not meant to run in systemd init scope
+#if 0
/* 4. Make sure we are in the special "init.scope" unit in the root slice. */
scope_path = strjoina(m->cgroup_root, "/" SPECIAL_INIT_SCOPE);
r = cg_create_and_attach(ELOGIND_CGROUP_CONTROLLER, scope_path, 0);
+#else
+ scope_path = strjoina(m->cgroup_root, "/elogind");
+ r = cg_create_and_attach(ELOGIND_CGROUP_CONTROLLER, scope_path, 0);
+#endif // 0
if (r < 0)
return log_error_errno(r, "Failed to create %s control group: %m", scope_path);