diff options
author | William Hubbs <williamh@gentoo.org> | 2012-01-26 11:02:00 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2012-01-26 11:02:00 -0600 |
commit | de5cee2c217e5ed606db19ca1433686048303297 (patch) | |
tree | 6ae25fe662af9ffa3626875df267b1f8f0485b5d | |
parent | 3ad501218d268f9884d84079f3e2de4ac0793147 (diff) |
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.in | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/init.d/sysfs.in b/init.d/sysfs.in index 962fcfdb..8ba988a0 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 |