diff options
author | Tim Harder <radhermit@gentoo.org> | 2019-02-25 05:55:36 -0600 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2019-02-25 06:07:20 -0600 |
commit | 7a256457b840ea66345e7a00f6a90dbf05c27381 (patch) | |
tree | ba7f78407236fe1ce6e73d534418c58c2a2de010 /eclass | |
parent | sys-apps/sysvinit: Bump to version 2.94. Removed old. (diff) | |
download | gentoo-7a256457b840ea66345e7a00f6a90dbf05c27381.tar.gz gentoo-7a256457b840ea66345e7a00f6a90dbf05c27381.tar.bz2 gentoo-7a256457b840ea66345e7a00f6a90dbf05c27381.zip |
user.eclass: avoid calling nscd if it doesn't exist
Signed-off-by: Tim Harder <radhermit@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/user.eclass | 4 |
1 files 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 |