summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-26 06:50:27 +0000
committerMike Frysinger <vapier@gentoo.org>2011-11-26 06:50:27 +0000
commit2e2ca30312fb49d5ae98e71896a5bd483ac59b17 (patch)
tree4200d41a16af1f0f19aee79c9746aae0056c31ff
parentdo not touch sandbox settings since we only run in pkg_* funcs (where sandbox... (diff)
downloadgentoo-2-2e2ca30312fb49d5ae98e71896a5bd483ac59b17.tar.gz
gentoo-2-2e2ca30312fb49d5ae98e71896a5bd483ac59b17.tar.bz2
gentoo-2-2e2ca30312fb49d5ae98e71896a5bd483ac59b17.zip
re-use "eshell" when searching for a shell to avoid missing "local shell" decl pointed out by Brian Harring
-rw-r--r--eclass/user.eclass16
1 files changed, 7 insertions, 9 deletions
diff --git a/eclass/user.eclass b/eclass/user.eclass
index d46d3b2ce54c..07ebc90c8a2d 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.12 2011/11/26 06:45:38 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.13 2011/11/26 06:50:27 vapier Exp $
# @ECLASS: user.eclass
# @MAINTAINER:
@@ -155,21 +155,19 @@ enewuser() {
die "Pass '-1' as the shell parameter"
fi
else
- for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do
- [[ -x ${ROOT}${shell} ]] && break
+ for eshell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do
+ [[ -x ${ROOT}${eshell} ]] && break
done
- if [[ ${shell} == "/dev/null" ]] ; then
+ if [[ ${eshell} == "/dev/null" ]] ; then
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" ;;
+ GNU) eshell="/bin/false" ;;
+ BSD) eshell="/sbin/nologin" ;;
+ Darwin) eshell="/usr/sbin/nologin" ;;
*) die "Unable to identify the default shell for userland ${USERLAND}"
esac
fi
-
- eshell=${shell}
fi
einfo " - Shell: ${eshell}"
opts+=" -s ${eshell}"