summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2012-01-26 11:02:00 -0600
committerWilliam Hubbs <williamh@gentoo.org>2012-01-26 11:02:00 -0600
commitde5cee2c217e5ed606db19ca1433686048303297 (patch)
tree6ae25fe662af9ffa3626875df267b1f8f0485b5d
parent3ad501218d268f9884d84079f3e2de4ac0793147 (diff)
downloadopenrc-de5cee2c217e5ed606db19ca1433686048303297.tar.gz
openrc-de5cee2c217e5ed606db19ca1433686048303297.tar.bz2
openrc-de5cee2c217e5ed606db19ca1433686048303297.tar.xz
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
-rw-r--r--init.d/sysfs.in6
1 files changed, 2 insertions, 4 deletions
diff --git a/init.d/sysfs.in b/init.d/sysfs.in
index 962fcfd..8ba988a 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -74,10 +74,8 @@ mount_misc()
mount_cgroups()
{
- yesno ${rc_cgroups:-YES} || return 0
- if [ ! -e /proc/cgroups ]; then
- return 0
- fi
+ yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \
+ mountinfo -q /sys/fs/cgroup || return 0
local agent="@LIBEXECDIR@/sh/cgroup-release-agent.sh"
mkdir /sys/fs/cgroup/openrc