aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-06 11:59:55 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-06 12:11:29 -0500
commitb20a1951adf9a705a903fb3047b7ef26c013103c (patch)
tree5ea9abe062adb3f99a75a3bdeccc2f027d46058a
parentbf0c0dd5644436efe4986c2b259b755d111266b9 (diff)
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
-rw-r--r--sh/rc-cgroup.sh.in4
1 files changed, 3 insertions, 1 deletions
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