From 7a256457b840ea66345e7a00f6a90dbf05c27381 Mon Sep 17 00:00:00 2001 From: Tim Harder Date: Mon, 25 Feb 2019 05:55:36 -0600 Subject: [PATCH] user.eclass: avoid calling nscd if it doesn't exist Signed-off-by: Tim Harder --- eclass/user.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/user.eclass b/eclass/user.eclass index 97e417a7be9d..f6a10a6bee28 100644 --- a/eclass/user.eclass +++ b/eclass/user.eclass @@ -88,8 +88,8 @@ egetent() { grep "${key}:\*:" /etc/${db} ;; *) - # ignore output if nscd doesn't exist, or we're not running as root - nscd -i "${db}" 2>/dev/null + # ignore nscd output if we're not running as root + type -p nscd >/dev/null && nscd -i "${db}" 2>/dev/null getent "${db}" "${key}" ;; esac -- 2.26.2