From 993e7d704404a8ff1a355bf4a38d1d92e7cc56cd Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 25 Sep 2013 20:05:41 -0500 Subject: [PATCH] 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 --- sh/rc-cgroup.sh.in | 2 +- sh/runscript.sh.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/rc-cgroup.sh.in b/sh/rc-cgroup.sh.in index 9329b57b..b635340a 100644 --- a/sh/rc-cgroup.sh.in +++ b/sh/rc-cgroup.sh.in @@ -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 ; } diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index a1ed9c68..f8fcbc5c 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -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