diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-02-29 22:34:41 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-02-29 22:34:41 +0000 |
commit | 9d149c81dfd74dad518fc4d20e1a720084207e9c (patch) | |
tree | fa62e6695ac99436b6ea00e108a104e872822e4c /eclass/eutils.eclass | |
parent | Bump (Manifest recommit) (diff) | |
download | gentoo-2-9d149c81dfd74dad518fc4d20e1a720084207e9c.tar.gz gentoo-2-9d149c81dfd74dad518fc4d20e1a720084207e9c.tar.bz2 gentoo-2-9d149c81dfd74dad518fc4d20e1a720084207e9c.zip |
fix group check in enewuser #43278
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index f35beca9f09b..87e7f26f4ff3 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.84 2004/02/29 07:17:27 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.85 2004/02/29 22:34:41 vapier Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # @@ -562,16 +562,13 @@ enewuser() { local egroups="$1"; shift if [ ! -z "${egroups}" ] then - local realgroup= local oldifs="${IFS}" export IFS="," for g in ${egroups} do - chgrp ${g} ${tmpfile} >& /dev/null - realgroup="`ls -l ${tmpfile} | awk '{print $4}'`" - if [ "${g}" != "${realgroup}" ] + if [ -z "`getent group \"${g}\"`" ] then - eerror "You must add ${g} to the system first" + eerror "You must add group ${g} to the system first" die "${g} is not a valid GID" fi done |