fix cgroup_cleanup function

The yesno test for rc_cgroup_cleanup belongs at the point where this
function is called from runscript, not in the function itself.

X-Gentoo-Bug: 486210
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=486210
This commit is contained in:
William Hubbs 2013-09-25 20:05:41 -05:00
parent de88aff0a8
commit 993e7d7044
2 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,7 @@ cgroup_set_limits()
cgroup_cleanup()
{
yesno "${rc_cgroup_cleanup:-no}" && cgroup_running || return 0
cgroup_running || return 0
ebegin "starting cgroups cleanup"
for sig in TERM QUIT INT; do
cgroup_get_pids || { eend 0 "finished" ; return 0 ; }

View File

@ -308,6 +308,7 @@ while [ -n "$1" ]; do
fi
[ "$(command -v cgroup_cleanup)" = "cgroup_cleanup" -a \
"$1" = "stop" ] && \
yesno "${rc_cgroup_cleanup}" && \
cgroup_cleanup
shift
continue 2