1 |
commit: cea71369e99a08c0fc3d9166bbfe9247ef8900ce |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 29 15:47:43 2012 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 15:47:43 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=cea71369 |
7 |
|
8 |
cgroups: only create the cgroup when the service is being started |
9 |
|
10 |
--- |
11 |
sh/runscript.sh.in | 4 ++-- |
12 |
1 files changed, 2 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in |
15 |
index 18bf4c3..83db42b 100644 |
16 |
--- a/sh/runscript.sh.in |
17 |
+++ b/sh/runscript.sh.in |
18 |
@@ -189,8 +189,8 @@ unset _conf_d |
19 |
# Load any system overrides |
20 |
sourcex -e "@SYSCONFDIR@/rc.conf" |
21 |
|
22 |
-if [ "$RC_UNAME" = "Linux" ]; then |
23 |
- if [ -d /sys/fs/cgroup/openrc ] && checkpath -W /sys/fs/cgroup/openrc ; then |
24 |
+if [ "$RC_UNAME" = "Linux" -a "$1" = "start" ]; then |
25 |
+ if [ -d /sys/fs/cgroup/openrc ]; then |
26 |
mkdir -p /sys/fs/cgroup/openrc/${RC_SVCNAME} |
27 |
echo $$ > /sys/fs/cgroup/openrc/${RC_SVCNAME}/tasks |
28 |
fi |