[oe-commits] [openembedded-core] 02/02: useradd: Fix infinite build loop
git at git.openembedded.org
git at git.openembedded.org
Mon May 23 09:05:36 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit f18eb5d604b9c1336984746a415a213ac6f0774c
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon May 23 10:02:23 2016 +0100
useradd: Fix infinite build loop
http://git.openembedded.org/openembedded-core-contrib/commit/?id=642c6cf0b6a0371de476513162bd0cefa9c438b3
introduces a problem if the USERADD_PARAM variable has trailing
whitespace as the code infititely loops.
Add a similar sed expression to $remaining to avoid this.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/useradd.bbclass | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 67dae88..28dd341 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -55,14 +55,14 @@ if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
# Invoke multiple instances of groupadd for parameter lists
# separated by ';'
opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
- remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2-`
+ remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
while test "x$opts" != "x"; do
perform_groupadd "$SYSROOT" "$OPT $opts"
if test "x$opts" = "x$remaining"; then
break
fi
opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
- remaining=`echo "$remaining" | cut -d ';' -f 2-`
+ remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
done
fi
@@ -71,14 +71,14 @@ if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
# Invoke multiple instances of useradd for parameter lists
# separated by ';'
opts=`echo "$USERADD_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
- remaining=`echo "$USERADD_PARAM" | cut -d ';' -f 2-`
+ remaining=`echo "$USERADD_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
while test "x$opts" != "x"; do
perform_useradd "$SYSROOT" "$OPT $opts"
if test "x$opts" = "x$remaining"; then
break
fi
opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
- remaining=`echo "$remaining" | cut -d ';' -f 2-`
+ remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
done
fi
@@ -87,14 +87,14 @@ if test "x`echo $GROUPMEMS_PARAM | tr -d '[:space:]'`" != "x"; then
# Invoke multiple instances of groupmems for parameter lists
# separated by ';'
opts=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
- remaining=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 2-`
+ remaining=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
while test "x$opts" != "x"; do
perform_groupmems "$SYSROOT" "$OPT $opts"
if test "x$opts" = "x$remaining"; then
break
fi
opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
- remaining=`echo "$remaining" | cut -d ';' -f 2-`
+ remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
done
fi
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list