aboutsummaryrefslogtreecommitdiff
path: root/init.d/sysfs.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2014-08-22 12:41:55 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2014-08-22 14:01:20 -0500
commit4f4f00d612ce6b43a2dcba9e0c39816e5d6d92a7 (patch)
treea4b0cf6388cc5b4a4ce8ed6b78d239f1883f7ea6 /init.d/sysfs.in
parent7b9fe5fced762935c48c90797b3bba2c82f10eb2 (diff)
cgroups: fix cgroup subsystem mounting
Originally, we aborted all of the cgroup setup if /sys/fs/cgroup/openrc was already mounted. This caused an issue in lxc containers, so we should always allow the subsystems to be mounted. X-Gentoo-Bug: 520606 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=520606
Diffstat (limited to 'init.d/sysfs.in')
-rw-r--r--init.d/sysfs.in17
1 files changed, 9 insertions, 8 deletions
diff --git a/init.d/sysfs.in b/init.d/sysfs.in
index 21566704..67485c24 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -100,14 +100,15 @@ mount_misc()
mount_cgroups()
{
mountinfo -q /sys/fs/cgroup || return 0
- mountinfo -q /sys/fs/cgroup/openrc || return 0
-
- local agent="@LIBEXECDIR@/sh/cgroup-release-agent.sh"
- mkdir /sys/fs/cgroup/openrc
- mount -n -t cgroup \
- -o none,${sysfs_opts},name=openrc,release_agent="$agent" \
- openrc /sys/fs/cgroup/openrc
- echo 1 > /sys/fs/cgroup/openrc/notify_on_release
+
+ if ! mountinfo -q /sys/fs/cgroup/openrc; then
+ local agent="@LIBEXECDIR@/sh/cgroup-release-agent.sh"
+ mkdir /sys/fs/cgroup/openrc
+ mount -n -t cgroup \
+ -o none,${sysfs_opts},name=openrc,release_agent="$agent" \
+ openrc /sys/fs/cgroup/openrc
+ echo 1 > /sys/fs/cgroup/openrc/notify_on_release
+ fi
yesno ${rc_controller_cgroups:-YES} && [ -e /proc/cgroups ] || return 0
while read name hier groups enabled rest; do