summaryrefslogtreecommitdiff
path: root/sh/runscript.sh.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2013-06-25 10:50:13 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-06-25 10:58:27 -0500
commit2391ddff772ce541bc2237c89a2792a0b85e076c (patch)
tree8d5583ab9caff5d9eca10d2e2be8376f0b36934f /sh/runscript.sh.in
parent02a7d3573d551c5d169eaa465ef90349d1ee367e (diff)
downloadopenrc-2391ddff772ce541bc2237c89a2792a0b85e076c.tar.gz
openrc-2391ddff772ce541bc2237c89a2792a0b85e076c.tar.bz2
openrc-2391ddff772ce541bc2237c89a2792a0b85e076c.tar.xz
cgroups: add support for systemd cgroup hierarchy
The systemd cgroup hierarchy support is being added so we can run logind outside of systemd. This is needed because software that was using consolekit is now migrating to logind. We do not create this hierarchy, we just add services to it if it exists.
Diffstat (limited to 'sh/runscript.sh.in')
-rw-r--r--sh/runscript.sh.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
index 58e8eac..a1ed9c6 100644
--- a/sh/runscript.sh.in
+++ b/sh/runscript.sh.in
@@ -209,6 +209,10 @@ sourcex -e "@SYSCONFDIR@/rc.conf"
[ -n "${rc_ulimit:-$RC_ULIMIT}" ] && ulimit ${rc_ulimit:-$RC_ULIMIT}
# Apply cgroups settings if defined
+if [ "$(command -v cgroup_add_service)" = "cgroup_add_service" ]; then
+ cgroup_add_service /sys/fs/cgroup/openrc
+ cgroup_add_service /sys/fs/cgroup/systemd/system
+fi
[ "$(command -v cgroup_set_limits)" = "cgroup_set_limits" ] && \
cgroup_set_limits