diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-17 12:55:02 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-17 12:55:51 +0000 |
commit | 0a2f9eb5822ad3cb85f55c4f7c1c5de36544f137 (patch) | |
tree | 86413e2b940d0d910bb67ce1b49565e97a022783 | |
parent | 1e3c5a742bf5142296174282ef1811b71acad683 (diff) | |
download | abuild-0a2f9eb5822ad3cb85f55c4f7c1c5de36544f137.tar.gz abuild-0a2f9eb5822ad3cb85f55c4f7c1c5de36544f137.tar.bz2 abuild-0a2f9eb5822ad3cb85f55c4f7c1c5de36544f137.tar.xz abuild-0a2f9eb5822ad3cb85f55c4f7c1c5de36544f137.zip |
abuild: fix user creation when group exists
-rwxr-xr-x | abuild.in | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |