summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-10-06 07:00:14 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-10-06 07:00:14 +0000
commitd4e5a7e7c673dcfae5f779867630ec3f83f3c80d (patch)
tree17575c376ac6194743e5f6da6b199fa312c9a3a8 /eclass/eutils.eclass
parentStable on ppc wrt bug 149924 (diff)
downloadgentoo-2-d4e5a7e7c673dcfae5f779867630ec3f83f3c80d.tar.gz
gentoo-2-d4e5a7e7c673dcfae5f779867630ec3f83f3c80d.tar.bz2
gentoo-2-d4e5a7e7c673dcfae5f779867630ec3f83f3c80d.zip
Fallback to the default userland disabled shell, if the shell cannot be found in the system (e.g.: with catalyst).
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass11
1 files changed, 8 insertions, 3 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 13134556a2a6..75dba34c155d 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.252 2006/10/05 00:12:07 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.253 2006/10/06 07:00:14 flameeyes Exp $
#
# This eclass is for general purpose functions that most ebuilds
# have to implement themselves.
@@ -503,8 +503,13 @@ enewuser() {
done
if [[ ${shell} == "/dev/null" ]] ; then
- eerror "Unable to identify the shell to use"
- die "Unable to identify the shell to use"
+ eerror "Unable to identify the shell to use, proceeding with userland default."
+ case ${USERLAND} in
+ GNU) shell="/bin/false" ;;
+ BSD) shell="/sbin/nologin" ;;
+ Darwin) shell="/usr/sbin/nologin" ;;
+ *) die "Unable to identify the default shell for userland ${USERLAND}"
+ esac
fi
eshell=${shell}