aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2012-01-29 09:47:43 -0600
committerWilliam Hubbs <williamh@gentoo.org>2012-01-29 09:47:43 -0600
commitcea71369e99a08c0fc3d9166bbfe9247ef8900ce (patch)
treeafce15b2a773e0192d67b1986f6b328d1d940fab /sh
parentfb4aa20d053d055a83cf25f07f4185ea79cb7b30 (diff)
cgroups: only create the cgroup when the service is being started
Diffstat (limited to 'sh')
-rw-r--r--sh/runscript.sh.in4
1 files 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