diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2015-10-13 14:53:43 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2015-10-13 15:07:53 -0500 |
commit | 9d53d436ae22d6f0f6fc1537e836dd1b4d31cf35 (patch) | |
tree | 1a7b7f95301b8f2fec18b2ba2b0712fae24cb269 /init.d/sysfs.in | |
parent | b81317bdf8e3eed8b8ff2bef757ba29f362ed297 (diff) |
sysfs: consolidate cgroup processing code in a single function
Diffstat (limited to 'init.d/sysfs.in')
-rw-r--r-- | init.d/sysfs.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/init.d/sysfs.in b/init.d/sysfs.in index f0bb3131..96fa460c 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 |