/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.220 Revision 1.221
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.220 2005/12/13 14:08:29 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.221 2005/12/31 14:11:39 vapier Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
484 einfo " - Userid: ${euid}" 484 einfo " - Userid: ${euid}"
485 485
486 # handle shell 486 # handle shell
487 local eshell=$1; shift 487 local eshell=$1; shift
488 if [[ ! -z ${eshell} ]] && [[ ${eshell} != "-1" ]] ; then 488 if [[ ! -z ${eshell} ]] && [[ ${eshell} != "-1" ]] ; then
489 if [[ ! -e ${eshell} ]] ; then 489 if [[ ! -e ${ROOT}${eshell} ]] ; then
490 eerror "A shell was specified but it does not exist !" 490 eerror "A shell was specified but it does not exist !"
491 die "${eshell} does not exist" 491 die "${eshell} does not exist in ${ROOT}"
492 fi
493 if [[ ${eshell} == */false || ${eshell} == */nologin ]] ; then
494 eerror "Do not specify ${eshell} yourself, use -1"
495 die "Pass '-1' as the shell parameter"
492 fi 496 fi
493 else 497 else
494 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do 498 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do
495 [[ -x ${ROOT}${shell} ]] && break 499 [[ -x ${ROOT}${shell} ]] && break
496 done 500 done

Legend:
Removed from v.1.220  
changed lines
  Added in v.1.221

  ViewVC Help
Powered by ViewVC 1.1.20