From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1291313888F for ; Tue, 6 Oct 2015 17:17:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16C3C21C001; Tue, 6 Oct 2015 17:17:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B608E21C001 for ; Tue, 6 Oct 2015 17:17:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9B0DE340877 for ; Tue, 6 Oct 2015 17:17:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5D726AE2 for ; Tue, 6 Oct 2015 17:17:00 +0000 (UTC) From: "William Hubbs" 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" Message-ID: <1444151489.b20a1951adf9a705a903fb3047b7ef26c013103c.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/rc-cgroup.sh.in X-VCS-Directories: sh/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: b20a1951adf9a705a903fb3047b7ef26c013103c X-VCS-Branch: master Date: Tue, 6 Oct 2015 17:17:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3f6008f0-716d-407c-836e-620f68cd58ea X-Archives-Hash: 69af63ef9a7505b71cbcb85031ba851c commit: b20a1951adf9a705a903fb3047b7ef26c013103c Author: William Hubbs gmail com> AuthorDate: Tue Oct 6 16:59:55 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Oct 6 17:11:29 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b20a1951 rc-cgroup.sh: Do not add leading spaces to cgroup values We were starting the value we write to the cgroup setting file with leading spaces and this was causing issues. This change makes sure that we aren't adding leading spaces to the value. X-Gentoo-Bug: 562354 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562354 sh/rc-cgroup.sh.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sh/rc-cgroup.sh.in b/sh/rc-cgroup.sh.in index c7cac2a..3f34d17 100644 --- a/sh/rc-cgroup.sh.in +++ b/sh/rc-cgroup.sh.in @@ -54,7 +54,9 @@ cgroup_set_values() val= ;; *) - val="$val $1" + [ -n "$val" ] && + val="$val $1" || + val="$1" ;; esac shift