summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-12-20 01:42:36 -0600
committerWilliam Hubbs <williamh@gentoo.org>2011-12-20 01:42:36 -0600
commitf6dc3d5ae91ff6a660cf71a92d4a3a120b1180a4 (patch)
treeba621c4e79143080c3764fe60b45359c2e8bc076
parent3e2001f6a2f6d49f452b8d5b009c7190b7839524 (diff)
downloadopenrc-f6dc3d5ae91ff6a660cf71a92d4a3a120b1180a4.tar.gz
openrc-f6dc3d5ae91ff6a660cf71a92d4a3a120b1180a4.tar.bz2
openrc-f6dc3d5ae91ff6a660cf71a92d4a3a120b1180a4.tar.xz
cgroups: always mount the tmpfs on /sys/fs/cgroup
X-Gentoo-Bug:395079 X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=395079
-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 a709e5d..8809bda 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -60,15 +60,8 @@ mount_misc()
eend $?
fi
fi
-}
-
-mount_cgroups()
-{
- yesno ${rc_cgroups:-NO} || return 0
- if [ ! -e /proc/cgroups ]; then
- return 0
- fi
+ # set up kernel support for cgroups
if [ -d /sys/fs/cgroup ] && ! mountinfo -q /sys/fs/cgroup; then
if grep -qs cgroup /proc/filesystems; then
ebegin "Mounting cgroup filesystem"
@@ -77,6 +70,14 @@ mount_cgroups()
eend $?
fi
fi
+}
+
+mount_cgroups()
+{
+ yesno ${rc_cgroups:-NO} || return 0
+ if [ ! -e /proc/cgroups ]; then
+ return 0
+ fi
while read name hier groups enabled rest; do
case "${enabled}" in