summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-10-27 07:49:53 +0000
committerMike Frysinger <vapier@gentoo.org>2011-10-27 07:49:53 +0000
commitd3a0c210f16e67ae92b58a205061ecfb39f86e87 (patch)
tree60332e6a88efec99f8e63f024b087a27f7aa97cb /eclass
parentadd snakeoil 0.4.4, punt old versions (diff)
downloadgentoo-2-d3a0c210f16e67ae92b58a205061ecfb39f86e87.tar.gz
gentoo-2-d3a0c210f16e67ae92b58a205061ecfb39f86e87.tar.bz2
gentoo-2-d3a0c210f16e67ae92b58a205061ecfb39f86e87.zip
send nscd output to /dev/null so we don't dump ugly warnings when running as non-root
Diffstat (limited to 'eclass')
-rw-r--r--eclass/user.eclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/eclass/user.eclass b/eclass/user.eclass
index f85bbae0c10e..f89ea6dfd98b 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.2 2011/10/27 07:26:55 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.3 2011/10/27 07:49:53 vapier Exp $
# @ECLASS: user.eclass
# @MAINTAINER:
@@ -72,7 +72,8 @@ egetent() {
grep "$2:\*:" /etc/$1
;;
*)
- type -p nscd >& /dev/null && nscd -i "$1"
+ # ignore output if nscd doesn't exist, or we're not running as root
+ nscd -i "$1" 2>/dev/null
getent "$1" "$2"
;;
esac