[Nix-dev] nscd startup
Rickard Nilsson
rickard.nilsson at telia.com
Thu Jan 19 20:21:56 CET 2012
Hi,
I have noticed that nscd might start before /etc/resolv.conf has been
written (I think this is the cause), which results in hostname lookup
failures after login. It takes a while until the name resolution works,
even though the network works during all this time. Presumably nscd thinks
the hostnames are unavailable, and doesn't try querying the name servers
until some time-to-live has passed. I fixed this on my system by not
starting the nscd job on the "startup" event, but rather on "ip-up":
--- a/modules/services/system/nscd.nix
+++ b/modules/services/system/nscd.nix
@@ -42,7 +42,7 @@ in
jobs.nscd =
{ description = "Name Service Cache Daemon";
- startOn = "startup";
+ startOn = if config.networking.interfaces != [] then "ip-up" else
"startup";
environment = { LD_LIBRARY_PATH = nssModulesPath; };
This works much more reliably on my system. If you think this is a
sensible solution to the problem, I would be happy if it could be
committed.
Best regards,
Rickard Nilsson
More information about the nix-dev
mailing list