From cea71369e99a08c0fc3d9166bbfe9247ef8900ce Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sun, 29 Jan 2012 09:47:43 -0600 Subject: [PATCH] cgroups: only create the cgroup when the service is being started --- sh/runscript.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index 18bf4c35..83db42b1 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -189,8 +189,8 @@ unset _conf_d # Load any system overrides sourcex -e "@SYSCONFDIR@/rc.conf" -if [ "$RC_UNAME" = "Linux" ]; then - if [ -d /sys/fs/cgroup/openrc ] && checkpath -W /sys/fs/cgroup/openrc ; then +if [ "$RC_UNAME" = "Linux" -a "$1" = "start" ]; then + if [ -d /sys/fs/cgroup/openrc ]; then mkdir -p /sys/fs/cgroup/openrc/${RC_SVCNAME} echo $$ > /sys/fs/cgroup/openrc/${RC_SVCNAME}/tasks fi