summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2003-07-18 15:10:13 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2003-07-18 15:10:13 +0000
commit88834ddd98eb0d99e841e06936566b85396fcdf8 (patch)
tree3c36d0a665f5ca2388e9f4bd21c10fda64b57eec /eclass
parentEditied init scripts from "use net" to "need net" (diff)
downloadhistorical-88834ddd98eb0d99e841e06936566b85396fcdf8.tar.gz
historical-88834ddd98eb0d99e841e06936566b85396fcdf8.tar.bz2
historical-88834ddd98eb0d99e841e06936566b85396fcdf8.zip
Added file matching to games_get_cd and made enewuser and enewgroup less chatty
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass8
-rw-r--r--eclass/games.eclass7
2 files changed, 7 insertions, 8 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 903486ea1cf6..6ea60910e45a 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.41 2003/07/14 04:47:17 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.42 2003/07/18 15:10:13 wolf31o2 Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -476,7 +476,6 @@ 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}`"
@@ -486,9 +485,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=""
@@ -588,7 +587,6 @@ 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}`"
@@ -598,9 +596,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=""
diff --git a/eclass/games.eclass b/eclass/games.eclass
index 163cf6d09a36..5468289d08f8 100644
--- a/eclass/games.eclass
+++ b/eclass/games.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/games.eclass,v 1.40 2003/07/10 02:03:39 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.41 2003/07/18 15:10:13 wolf31o2 Exp $
#
# devlist: {bass,phoenix,vapier}@gentoo.org
#
@@ -119,13 +119,14 @@ games_pkg_postinst() {
}
# some games require cdrom's to install datafiles ...
-# $1: directory to check for on cdrom
+# $1: directory or file to check for on cdrom
# after function call, cdrom should be in ${GAMES_CD}
games_get_cd() {
export GAMES_CD=${GAMES_CDROM}
if [ -z "${GAMES_CD}" ] ; then
for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'` ; do
- [ -d ${mline}/${1} ] && GAMES_CD=${mline}
+ [ -d ${mline}/${1} ] && GAMES_CD=${mline} ||
+ [ -f ${mline}/${1} ] && GAMES_CD=${mline}
done
fi
[ ! -z "${GAMES_CD}" ] && einfo "Using ${GAMES_CD} as the data source"