summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-13 04:35:34 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-13 04:35:34 +0200
commitdf18d8c8959bbd9d7b866c6946aa856e462a06b3 (patch)
treed4a0aa861897a6053476c9eb32366eda8d53e887
parent090bf7cbc4c2c4363e74c7f250ac65e7e2323ca6 (diff)
unit: skip default cgroup setup if we have no hierarchy to work on
-rw-r--r--src/unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unit.c b/src/unit.c
index e19061c504..f50477f878 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -1876,6 +1876,9 @@ int unit_add_default_cgroups(Unit *u) {
/* Adds in the default cgroups, if they weren't specified
* otherwise. */
+ if (!u->meta.manager->cgroup_hierarchy)
+ return 0;
+
if ((r = unit_add_one_default_cgroup(u, NULL)) < 0)
return r;