aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMaciej Borzecki <maciej.borzecki@open-rnd.pl>2016-02-10 13:32:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 12:27:24 +0000
commit466288d528cce5f9887d765a757af64c9cc6be03 (patch)
tree04737e80c99bb089ebb5b35cffe3dd9244617951 /meta/classes
parentaff19af6804b27f1a97ce11b5bd35190426c6f3c (diff)
downloadopenembedded-core-contrib-466288d528cce5f9887d765a757af64c9cc6be03.tar.gz
classes/useradd: handle whitespace only USERADD/GROUPADD/GROUPMEMS
Useradd attempts to add users/groups even when {USERADD,GROUPADD,GROUPMEMS}_PARAM is whitespace only. This scenario is possible when variables and modified using one of +=, =+ operator, yet the content being added is conditional (i.e. may depend on PACKAGECONFIG flags). Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/useradd.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 4577e56f5a..c960656f02 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -50,7 +50,7 @@ fi
# Perform group additions first, since user additions may depend
# on these groups existing
-if test "x$GROUPADD_PARAM" != "x"; then
+if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
echo "Running groupadd commands..."
# Invoke multiple instances of groupadd for parameter lists
# separated by ';'
@@ -66,7 +66,7 @@ if test "x$GROUPADD_PARAM" != "x"; then
done
fi
-if test "x$USERADD_PARAM" != "x"; then
+if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
echo "Running useradd commands..."
# Invoke multiple instances of useradd for parameter lists
# separated by ';'
@@ -82,7 +82,7 @@ if test "x$USERADD_PARAM" != "x"; then
done
fi
-if test "x$GROUPMEMS_PARAM" != "x"; then
+if test "x`echo $GROUPMEMS_PARAM | tr -d '[:space:]'`" != "x"; then
echo "Running groupmems commands..."
# Invoke multiple instances of groupmems for parameter lists
# separated by ';'