summaryrefslogtreecommitdiff
path: root/src/journal/journald.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-03 23:41:55 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-03 23:41:55 +0100
commitbad75c274a488715a845ff8e5ec3140036929e94 (patch)
tree0a8213ec5360caf95549b00a749590ccf8e5a68d /src/journal/journald.c
parentbda061759c3baef4383a2ec0bf1b538905cb30b0 (diff)
journald: fix _SYSTEMD_CGROUP= values
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r--src/journal/journald.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 1faf570161..b42be8d7ad 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -391,7 +391,9 @@ static char *shortened_cgroup_path(pid_t pid) {
return NULL;
}
- if (streq(init_path, "/"))
+ if (endswith(init_path, "/system"))
+ init_path[strlen(init_path) - 7] = 0;
+ else if (streq(init_path, "/"))
init_path[0] = 0;
if (startswith(process_path, init_path)) {