summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2003-07-18 15:29:17 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2003-07-18 15:29:17 +0000
commit4953f94e666e25e9a11295b7265fedce8b305bb0 (patch)
treed88f976d53719d065f59654b185a1f48e46bc22b /eclass/eutils.eclass
parentAdded DEPEND. Closes #24739. (diff)
downloadgentoo-2-4953f94e666e25e9a11295b7265fedce8b305bb0.tar.gz
gentoo-2-4953f94e666e25e9a11295b7265fedce8b305bb0.tar.bz2
gentoo-2-4953f94e666e25e9a11295b7265fedce8b305bb0.zip
Added a 'press enter' function
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass22
1 files changed, 19 insertions, 3 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 6ea60910e45a..2232fb50f2ea 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.42 2003/07/18 15:10:13 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.43 2003/07/18 15:29:17 wolf31o2 Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -476,6 +476,7 @@ enewuser() {
eerror "No username specified !"
die "Cannot call enewuser without a username"
fi
+ einfo "Adding user '${euser}' to your system ..."
# setup a file for testing usernames/groups
local tmpfile="`mktemp -p ${T}`"
@@ -485,9 +486,9 @@ enewuser() {
# see if user already exists
if [ "${euser}" == "${realuser}" ] ; then
+ einfo "${euser} already exists on your system :)"
return 0
fi
- einfo "Adding user '${euser}' to your system ..."
# options to pass to useradd
local opts=""
@@ -587,6 +588,7 @@ enewgroup() {
eerror "No group specified !"
die "Cannot call enewgroup without a group"
fi
+ einfo "Adding group '${egroup}' to your system ..."
# setup a file for testing groupname
local tmpfile="`mktemp -p ${T}`"
@@ -596,9 +598,9 @@ enewgroup() {
# see if group already exists
if [ "${egroup}" == "${realgroup}" ] ; then
+ einfo "${egroup} already exists on your system :)"
return 0
fi
- einfo "Adding group '${egroup}' to your system ..."
# options to pass to useradd
local opts=""
@@ -876,3 +878,17 @@ unpack_makeself() {
local out="`tail +${skip} ${src} | gzip -cd | tar -x --no-same-owner -v -f -`"
[ -z "${out}" ] && die "failure unpacking makeself ${shrtsrc} ('${ver}' +${skip})"
}
+
+# Add a function to force the user to press RETURN.
+# I basically needed this for the UT2003 ebuild to pause
+# the ebuild until the user swapped the CD in the drive.
+# I put it here in case anyone else could use it.
+# wolf31o2@gentoo.org
+
+pressreturn()
+{
+ local REPLY
+
+ echo -n "Press <RETURN> to continue..."
+ read REPLY
+}