commit:     9d53d436ae22d6f0f6fc1537e836dd1b4d31cf35
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Oct 13 19:53:43 2015 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct 13 20:07:53 2015 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=9d53d436

sysfs: consolidate cgroup processing code in a single function

 init.d/sysfs.in | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/init.d/sysfs.in b/init.d/sysfs.in
index f0bb313..96fa460 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -61,16 +61,6 @@ mount_misc()
                fi
        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"
-                       local 
opts="${sysfs_opts},mode=755,size=${rc_cgroupsize:-10m}"
-                       mount -n -t tmpfs -o ${opts} cgroup_root /sys/fs/cgroup
-                       eend $?
-               fi
-       fi
-
        # set up kernel support for fusectl
        if [ -d /sys/fs/fuse/connections ] \
                && ! mountinfo -q /sys/fs/fuse/connections; then
@@ -108,6 +98,16 @@ mount_misc()
 
 mount_cgroups()
 {
+       # 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"
+                       local 
opts="${sysfs_opts},mode=755,size=${rc_cgroupsize:-10m}"
+                       mount -n -t tmpfs -o ${opts} cgroup_root /sys/fs/cgroup
+                       eend $?
+               fi
+       fi
+
        mountinfo -q /sys/fs/cgroup || return 0
 
        if ! mountinfo -q /sys/fs/cgroup/openrc; then

Reply via email to