summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2019-02-25 05:55:36 -0600
committerTim Harder <radhermit@gentoo.org>2019-02-25 06:07:20 -0600
commit7a256457b840ea66345e7a00f6a90dbf05c27381 (patch)
treeba7f78407236fe1ce6e73d534418c58c2a2de010 /eclass
parentsys-apps/sysvinit: Bump to version 2.94. Removed old. (diff)
downloadgentoo-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.eclass4
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