summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/useradd.bbclass')
-rw-r--r--meta/classes/useradd.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 1e03a04a8c..fb70b3e679 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -37,7 +37,13 @@ if test "x$GROUPADD_PARAM" != "x"; then
37 opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1` 37 opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1`
38 remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2-` 38 remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2-`
39 while test "x$opts" != "x"; do 39 while test "x$opts" != "x"; do
40 eval $PSEUDO groupadd -f $OPT $opts 40 groupname=`echo "$opts" | awk '{ print $NF }'`
41 group_exists=`grep "^$groupname:" $SYSROOT/etc/group || true`
42 if test "x$group_exists" = "x"; then
43 eval $PSEUDO groupadd $OPT $opts
44 else
45 echo "Note: group $groupname already exists, not re-creating it"
46 fi
41 47
42 if test "x$opts" = "x$remaining"; then 48 if test "x$opts" = "x$remaining"; then
43 break 49 break