]> code.ossystems Code Review - openembedded-core.git/commitdiff
useradd-staticids.bbclass: Make --no-user-group have effect
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 18 Dec 2015 23:53:48 +0000 (00:53 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 17 Jan 2016 11:32:19 +0000 (11:32 +0000)
If --no-user-group is specified in USERADD_PARAM_${PN} for a user and
no --gid is specified, then we should not assume that the group name
for the user is the user name.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/useradd-staticids.bbclass

index 9d59aca45c99a8f0c0eae2a129abafb739278c42..c2e6579b22f56faf825b3cf7fddc9159273707b4 100644 (file)
@@ -107,7 +107,7 @@ def update_useradd_static_config(d):
                             # is used, and we disable the user_group option.
                             #
                             user_group = uaargs.user_group is None or uaargs.user_group is True
-                            uaargs.groupname = [uaargs.gid, uaargs.LOGIN][not uaargs.gid or user_group]
+                            uaargs.groupname = [uaargs.LOGIN, uaargs.gid][not user_group]
                             uaargs.groupid = [uaargs.gid, uaargs.groupname][not uaargs.gid]
                             uaargs.groupid = [field[3], uaargs.groupid][not field[3]]