summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd.bbclass
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:44 +0000
commit9909104c673c9e9388d78d5fbe1ab9c9c421737c (patch)
treedc9faedd67011298c862df20776f2ab8363b0275 /meta/classes/useradd.bbclass
parente485686be71d92c3af72628368ff346635f47c9a (diff)
downloadpoky-9909104c673c9e9388d78d5fbe1ab9c9c421737c.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). (From OE-Core rev: 466288d528cce5f9887d765a757af64c9cc6be03) Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/useradd.bbclass')
-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
50 50
51# Perform group additions first, since user additions may depend 51# Perform group additions first, since user additions may depend
52# on these groups existing 52# on these groups existing
53if test "x$GROUPADD_PARAM" != "x"; then 53if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
54 echo "Running groupadd commands..." 54 echo "Running groupadd commands..."
55 # Invoke multiple instances of groupadd for parameter lists 55 # Invoke multiple instances of groupadd for parameter lists
56 # separated by ';' 56 # separated by ';'
@@ -66,7 +66,7 @@ if test "x$GROUPADD_PARAM" != "x"; then
66 done 66 done
67fi 67fi
68 68
69if test "x$USERADD_PARAM" != "x"; then 69if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
70 echo "Running useradd commands..." 70 echo "Running useradd commands..."
71 # Invoke multiple instances of useradd for parameter lists 71 # Invoke multiple instances of useradd for parameter lists
72 # separated by ';' 72 # separated by ';'
@@ -82,7 +82,7 @@ if test "x$USERADD_PARAM" != "x"; then
82 done 82 done
83fi 83fi
84 84
85if test "x$GROUPMEMS_PARAM" != "x"; then 85if test "x`echo $GROUPMEMS_PARAM | tr -d '[:space:]'`" != "x"; then
86 echo "Running groupmems commands..." 86 echo "Running groupmems commands..."
87 # Invoke multiple instances of groupmems for parameter lists 87 # Invoke multiple instances of groupmems for parameter lists
88 # separated by ';' 88 # separated by ';'