cgroups: make sure /sys/fs/cgroup is a mount point

We need to make sure this directory is a mount point before we add the
control groups.

Reported-by: Andrej Filipcic <andrej.filipcic@ijs.si>
X-Gentoo-Bug: 400903
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400903
This commit is contained in:
William Hubbs 2012-01-26 11:02:00 -06:00
parent 3ad501218d
commit de5cee2c21

View File

@ -74,10 +74,8 @@ mount_misc()
mount_cgroups() mount_cgroups()
{ {
yesno ${rc_cgroups:-YES} || return 0 yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \
if [ ! -e /proc/cgroups ]; then mountinfo -q /sys/fs/cgroup || return 0
return 0
fi
local agent="@LIBEXECDIR@/sh/cgroup-release-agent.sh" local agent="@LIBEXECDIR@/sh/cgroup-release-agent.sh"
mkdir /sys/fs/cgroup/openrc mkdir /sys/fs/cgroup/openrc