Commit 0a2f9eb5 authored by Natanael Copa's avatar Natanael Copa
Browse files

abuild: fix user creation when group exists

parent 1e3c5a74
......@@ -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"
$SUDO adduser -D -H $gopt $i || return 1
for i in $pkggroups; do
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment