summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2005-11-22 11:15:34 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2005-11-22 11:15:34 +0000
commitae2e88347b20b66cbb73f146c9fc37e858f05fb1 (patch)
tree0e80da783fde64fe6238dbaacbfd541f0622ff75 /eclass
parentUse mirror://gentoo/ for patchsets. (diff)
downloadgentoo-2-ae2e88347b20b66cbb73f146c9fc37e858f05fb1.tar.gz
gentoo-2-ae2e88347b20b66cbb73f146c9fc37e858f05fb1.tar.bz2
gentoo-2-ae2e88347b20b66cbb73f146c9fc37e858f05fb1.zip
Apply enewuser/enewgroup patch for OpenBSD as per bug #113236. Thanks Karol Pasternak for the patch.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass18
1 files changed, 16 insertions, 2 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 5284130efe17..e9f0961c14d3 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.217 2005/11/18 03:29:38 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.218 2005/11/22 11:15:34 flameeyes Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -434,7 +434,7 @@ egetent() {
pw show ${action} ${opts} "$2" -q
;;
- *-netbsd*)
+ *-netbsd*|*-openbsd*)
grep "$2:\*:" /etc/$1
;;
*)
@@ -602,6 +602,20 @@ enewuser() {
useradd ${opts} ${euser} "$@" || die "enewuser failed"
fi
;;
+
+ *-openbsd*)
+ if [[ -z $@ ]] ; then
+ useradd -u ${euid} -s ${eshell} \
+ -d ${ehome} -c "Added by portage for ${PN}" \
+ -g ${egroups} ${euser} || die "enewuser failed"
+ else
+ einfo " - Extra: $@"
+ useradd -u ${euid} -s ${eshell} \
+ -d ${ehome} -c "Added by portage for ${PN}" \
+ -g ${egroups} ${euser} "$@" || die "enewuser failed"
+ fi
+ ;;
+
*)
if [[ -z $@ ]] ; then
useradd ${opts} ${euser} \