Gentoo Archives: gentoo-commits

From: Tim Harder <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 25 Feb 2019 12:12:10
Message-Id: 1551096440.7a256457b840ea66345e7a00f6a90dbf05c27381.radhermit@gentoo
1 commit: 7a256457b840ea66345e7a00f6a90dbf05c27381
2 Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 25 11:55:36 2019 +0000
4 Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 25 12:07:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a256457
7
8 user.eclass: avoid calling nscd if it doesn't exist
9
10 Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>
11
12 eclass/user.eclass | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15 diff --git a/eclass/user.eclass b/eclass/user.eclass
16 index 97e417a7be9..f6a10a6bee2 100644
17 --- a/eclass/user.eclass
18 +++ b/eclass/user.eclass
19 @@ -88,8 +88,8 @@ egetent() {
20 grep "${key}:\*:" /etc/${db}
21 ;;
22 *)
23 - # ignore output if nscd doesn't exist, or we're not running as root
24 - nscd -i "${db}" 2>/dev/null
25 + # ignore nscd output if we're not running as root
26 + type -p nscd >/dev/null && nscd -i "${db}" 2>/dev/null
27 getent "${db}" "${key}"
28 ;;
29 esac