mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
useradd-staticids: Fix groupadd
When a group name is duplicated between USERADD_PARAM and GROUPADD_PARAM, this class tries to add it twice which results in failure of the groupadd command. (From OE-Core rev: 5b84cc895500c28674d2a7b7c2dd618cf8fb30e9) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
0eafcc05d8
commit
fdaa2d181d
@@ -165,7 +165,9 @@ def update_useradd_static_config(d):
|
|||||||
if newgroup and is_pkg:
|
if newgroup and is_pkg:
|
||||||
groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg)
|
groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg)
|
||||||
if groupadd:
|
if groupadd:
|
||||||
d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup))
|
# Only add the group if not already specified
|
||||||
|
if not uaargs.groupname in groupadd:
|
||||||
|
d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup))
|
||||||
else:
|
else:
|
||||||
d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup)
|
d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user