From b20a1951adf9a705a903fb3047b7ef26c013103c Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 6 Oct 2015 11:59:55 -0500 Subject: 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(-) (limited to 'sh') diff --git a/sh/rc-cgroup.sh.in b/sh/rc-cgroup.sh.in index c7cac2a9..3f34d179 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 -- cgit v1.2.3