mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-11 06:37:31 +00:00
abuild: fix user creation when group exists
This commit is contained in:
parent
1e3c5a742b
commit
0a2f9eb582
@ -385,8 +385,12 @@ mkusers() {
|
||||
local i
|
||||
for i in $pkgusers; do
|
||||
if ! getent passwd $i >/dev/null; then
|
||||
local gopt=
|
||||
msg "Creating user $i"
|
||||
$SUDO adduser -D -H $i || return 1
|
||||
if getent group $i >/dev/null; then
|
||||
gopt="-G $i"
|
||||
fi
|
||||
$SUDO adduser -D -H $gopt $i || return 1
|
||||
fi
|
||||
done
|
||||
for i in $pkggroups; do
|
||||
|
Loading…
Reference in New Issue
Block a user