summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2005-10-07 16:21:48 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2005-10-07 16:21:48 +0000
commitf71ddd5d8015925b47a1c04d79a6bddcbcad0393 (patch)
tree6d7098138dd55239e7a017bae8cd4b8d689b65b8 /eclass
parentDon't assume ld is GNU ld. (diff)
downloadhistorical-f71ddd5d8015925b47a1c04d79a6bddcbcad0393.tar.gz
historical-f71ddd5d8015925b47a1c04d79a6bddcbcad0393.tar.bz2
historical-f71ddd5d8015925b47a1c04d79a6bddcbcad0393.zip
Added code for netbsd user handling.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass16
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 5580d9315c00..f7e2ed0e9f8b 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.205 2005/10/07 15:31:46 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.206 2005/10/07 16:21:48 flameeyes Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -432,6 +432,9 @@ egetent() {
pw show ${action} ${opts} "$2" -q
;;
+ *-netbsd*)
+ grep "$2:\*:" /etc/$1
+ ;;
*)
type -p nscd >& /dev/null && nscd -i "$1"
getent "$1" "$2"
@@ -701,6 +704,17 @@ enewgroup() {
esac
pw groupadd ${egroup} -g ${egid} || die "enewgroup failed"
;;
+
+ *-netbsd*)
+ case ${egid} in
+ *[!0-9]*) # Non numeric
+ for egid in $(seq 101 999); do
+ [ -z "`egetent group ${egid}`" ] && break
+ done
+ esac
+ groupadd ${egroup} -g ${egid} || die "enewgroup failed"
+ ;;
+
*)
groupadd ${opts} ${egroup} || die "enewgroup failed"
;;