summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/manager.c b/src/manager.c
index bab16627..19e54417 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -247,8 +247,11 @@ int manager_new(ManagerRunningAs running_as, Manager **_m) {
if (!(m->environment = strv_copy(environ)))
goto fail;
- if (!(m->default_controllers = strv_new("cpu", NULL)))
- goto fail;
+ if (running_as == MANAGER_SYSTEM) {
+ m->default_controllers = strv_new("cpu", NULL);
+ if (!m->default_controllers)
+ goto fail;
+ }
if (!(m->units = hashmap_new(string_hash_func, string_compare_func)))
goto fail;