[Nix-dev] nscd startup

Eelco Dolstra e.dolstra at tudelft.nl
Sat Jan 21 20:16:01 CET 2012


Hi,

On 21/01/12 19:52, Peter Simons wrote:

>  > 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 sounds like ncsd should be re-started after an 'ip-up' event. Can
> upstart do that?

Yes, and in fact we already did that from the dhclient script.  I've now moved
the invalidation to a separate Upstart task triggered by ip-up (r31779):

  jobs.invalidate_nscd =
    { name = "invalidate-nscd";
      description = "Invalidate NSCD cache";
      startOn = "ip-up";
      task = true;
      exec = "${pkgs.glibc}/sbin/nscd --invalidate hosts";
    };

This way nscd can still be running all the time.  Rickard, does this solve the
problem for you?

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/


More information about the nix-dev mailing list