1 |
commit: 993e7d704404a8ff1a355bf4a38d1d92e7cc56cd |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Sep 26 01:05:41 2013 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 27 20:55:46 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=993e7d70 |
7 |
|
8 |
fix cgroup_cleanup function |
9 |
|
10 |
The yesno test for rc_cgroup_cleanup belongs at the point where this |
11 |
function is called from runscript, not in the function itself. |
12 |
|
13 |
X-Gentoo-Bug: 486210 |
14 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=486210 |
15 |
|
16 |
--- |
17 |
sh/rc-cgroup.sh.in | 2 +- |
18 |
sh/runscript.sh.in | 1 + |
19 |
2 files changed, 2 insertions(+), 1 deletion(-) |
20 |
|
21 |
diff --git a/sh/rc-cgroup.sh.in b/sh/rc-cgroup.sh.in |
22 |
index 9329b57..b635340 100644 |
23 |
--- a/sh/rc-cgroup.sh.in |
24 |
+++ b/sh/rc-cgroup.sh.in |
25 |
@@ -116,7 +116,7 @@ cgroup_set_limits() |
26 |
|
27 |
cgroup_cleanup() |
28 |
{ |
29 |
- yesno "${rc_cgroup_cleanup:-no}" && cgroup_running || return 0 |
30 |
+ cgroup_running || return 0 |
31 |
ebegin "starting cgroups cleanup" |
32 |
for sig in TERM QUIT INT; do |
33 |
cgroup_get_pids || { eend 0 "finished" ; return 0 ; } |
34 |
|
35 |
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in |
36 |
index a1ed9c6..f8fcbc5 100644 |
37 |
--- a/sh/runscript.sh.in |
38 |
+++ b/sh/runscript.sh.in |
39 |
@@ -308,6 +308,7 @@ while [ -n "$1" ]; do |
40 |
fi |
41 |
[ "$(command -v cgroup_cleanup)" = "cgroup_cleanup" -a \ |
42 |
"$1" = "stop" ] && \ |
43 |
+ yesno "${rc_cgroup_cleanup}" && \ |
44 |
cgroup_cleanup |
45 |
shift |
46 |
continue 2 |