diff options
author | 2005-09-18 17:33:44 +0000 | |
---|---|---|
committer | 2005-09-18 17:33:44 +0000 | |
commit | 90cd17d830477bedf80a2def84a5f4f8901da935 (patch) | |
tree | ad006033230eb6c212c5fe2c9fd38560e5102480 /eclass/eutils.eclass | |
parent | Stable on ppc64 (bug #105805) (diff) | |
download | historical-90cd17d830477bedf80a2def84a5f4f8901da935.tar.gz historical-90cd17d830477bedf80a2def84a5f4f8901da935.tar.bz2 historical-90cd17d830477bedf80a2def84a5f4f8901da935.zip |
Added portability eclass with seq() function to replace seq command. Make eutils use the new seq command for enewuser/enewgroup.
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 347a3c9bcc46..3f63db4c420b 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.196 2005/09/06 01:59:22 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.197 2005/09/18 17:33:44 flameeyes Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # @@ -9,7 +9,7 @@ # # NB: If you add anything, please comment it! -inherit multilib +inherit multilib portability DEPEND="!bootstrap? ( sys-devel/patch )" # sys-apps/shadow is needed for useradd, etc, bug #94745. @@ -479,13 +479,7 @@ enewuser() { euid="next" fi if [[ ${euid} == "next" ]] ; then - local pwrange - if [[ ${USERLAND} == "BSD" ]] ; then - pwrange=$(jot 898 101) - else - pwrange=$(seq 101 999) - fi - for euid in ${pwrange} ; do + for euid in $(seq 101 999) ; do [[ -z $(egetent passwd ${euid}) ]] && break done fi @@ -679,7 +673,7 @@ enewgroup() { # If we need the next available case ${egid} in *[!0-9]*) # Non numeric - for egid in `jot 898 101`; do + for egid in $(seq 101 999); do [ -z "`egetent group ${egid}`" ] && break done esac @@ -688,7 +682,7 @@ enewgroup() { elif [[ "${USERLAND}" == "BSD" ]] ; then case ${egid} in *[!0-9]*) # Non numeric - for egid in `jot 898 101`; do + for egid in $(seq 101 999); do [ -z "`egetent group ${egid}`" ] && break done esac |