@@ -, +, @@ set to NO. --- etc/rc.conf.Linux | 3 +++ init.d/sysfs.in | 2 +- sh/runscript.sh.in | 22 ++++++++++++---------- 3 files changed, 16 insertions(+), 11 deletions(-) --- a/etc/rc.conf.Linux +++ a/etc/rc.conf.Linux @@ -22,3 +22,6 @@ rc_sys="@RC_SYS_DEFAULT@" # consolefont, numlock, etc ...) rc_tty_number=12 +# Openrc will create a cgroup hierarchy called openrc which will have all +# services it starts and all subsystems attached to it. Default NO. +#rc_cgroups="YES" --- a/init.d/sysfs.in +++ a/init.d/sysfs.in @@ -70,7 +70,7 @@ mount_misc() cgroup /sys/fs/cgroup eend $? fi - if ! mountinfo -q /sys/fs/cgroup/openrc; then + if yesno ${rc_cgroups:-NO} && ! mountinfo -q /sys/fs/cgroup/openrc; then ebegin "creating openrc control group" mkdir /sys/fs/cgroup/openrc mount -n -t cgroup -o nodev,noexec,nosuid \ --- a/sh/runscript.sh.in +++ a/sh/runscript.sh.in @@ -132,16 +132,18 @@ start() mark_service_inactive fi if [ "$RC_UNAME" = Linux ]; then - local cgroup=/sys/fs/cgroup/openrc - local svc_cgroup=${cgroup}/${RC_SVCNAME} - if mountinfo -q ${cgroup}; then - mkdir ${svc_cgroup} - for f in cpuset.cpus cpuset.mems; do - if [ -f ${cgroup}/${f} ]; then - cp ${cgroup}/${f} ${svc_cgroup} - fi - done - echo $$ > ${svc_cgroup}/tasks + if yesno "${rc_cgroups:-NO}"; then + local cgroup=/sys/fs/cgroup/openrc + local svc_cgroup=${cgroup}/${RC_SVCNAME} + if mountinfo -q ${cgroup}; then + mkdir ${svc_cgroup} + for f in cpuset.cpus cpuset.mems; do + if [ -f ${cgroup}/${f} ]; then + cp ${cgroup}/${f} ${svc_cgroup} + fi + done + echo $$ > ${svc_cgroup}/tasks + fi fi fi eval start-stop-daemon --start \ --