From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-630912-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 9E8D31381F3
	for <garchives@archives.gentoo.org>; Fri, 27 Sep 2013 21:22:54 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 37D83E0C46;
	Fri, 27 Sep 2013 21:22:54 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C15B6E0C46
	for <gentoo-commits@lists.gentoo.org>; Fri, 27 Sep 2013 21:22:53 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id D84B933EE37
	for <gentoo-commits@lists.gentoo.org>; Fri, 27 Sep 2013 21:22:52 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 8CBF7E5309
	for <gentoo-commits@lists.gentoo.org>; Fri, 27 Sep 2013 21:22:51 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org>
Message-ID: <1380315346.993e7d704404a8ff1a355bf4a38d1d92e7cc56cd.williamh@OpenRC>
Subject: [gentoo-commits] proj/openrc:master commit in: sh/
X-VCS-Repository: proj/openrc
X-VCS-Files: sh/rc-cgroup.sh.in sh/runscript.sh.in
X-VCS-Directories: sh/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: 993e7d704404a8ff1a355bf4a38d1d92e7cc56cd
X-VCS-Branch: master
Date: Fri, 27 Sep 2013 21:22:51 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 32a51c3b-2649-4cc0-80d1-9c881edcab8b
X-Archives-Hash: 10640018f2a6d18a05498a425b376684

commit:     993e7d704404a8ff1a355bf4a38d1d92e7cc56cd
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Sep 26 01:05:41 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Sep 27 20:55:46 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=993e7d70

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 9329b57..b635340 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 a1ed9c6..f8fcbc5 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