Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: sh/
Date: Tue, 06 Oct 2015 17:17:07
Message-Id: 1444151489.b20a1951adf9a705a903fb3047b7ef26c013103c.williamh@OpenRC
1 commit: b20a1951adf9a705a903fb3047b7ef26c013103c
2 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
3 AuthorDate: Tue Oct 6 16:59:55 2015 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 6 17:11:29 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b20a1951
7
8 rc-cgroup.sh: Do not add leading spaces to cgroup values
9
10 We were starting the value we write to the cgroup setting file with
11 leading spaces and this was causing issues. This change makes sure that
12 we aren't adding leading spaces to the value.
13
14 X-Gentoo-Bug: 562354
15 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562354
16
17 sh/rc-cgroup.sh.in | 4 +++-
18 1 file changed, 3 insertions(+), 1 deletion(-)
19
20 diff --git a/sh/rc-cgroup.sh.in b/sh/rc-cgroup.sh.in
21 index c7cac2a..3f34d17 100644
22 --- a/sh/rc-cgroup.sh.in
23 +++ b/sh/rc-cgroup.sh.in
24 @@ -54,7 +54,9 @@ cgroup_set_values()
25 val=
26 ;;
27 *)
28 - val="$val $1"
29 + [ -n "$val" ] &&
30 + val="$val $1" ||
31 + val="$1"
32 ;;
33 esac
34 shift