From 488792a87d3dea18109fee7fa987f7edf6ba1149 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 4 Apr 2017 17:40:50 +0200 Subject: [PATCH] Make /var/run/nscd/socket optional Not every distribution uses nscd. --- src/libstore/build.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 43a8dadf8..14982424d 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2405,7 +2405,8 @@ void DerivationGoal::runChild() ss.push_back("/etc/nsswitch.conf"); ss.push_back("/etc/services"); ss.push_back("/etc/hosts"); - ss.push_back("/var/run/nscd/socket"); + if (pathExists("/var/run/nscd/socket")) + ss.push_back("/var/run/nscd/socket"); } for (auto & i : ss) dirsInChroot[i] = i;