[Nix-dev] bind root hints

Tim Barbour trb at categorical.net
Sat Oct 19 12:18:16 CEST 2013


Tim Barbour writes:
 > The DNS HOWTO (http://www.tldp.org/HOWTO/DNS-HOWTO-8.html) recommends using
 > dig to get the root hints. Since dig is included with bind, it should be
 > available by the time preStart runs, so I think we could use dig in preStart
 > to fetch the root hints each time preStart runs. Unfortunately, that approach
 > does not provide the version number information (being in a comment, which dig
 > will not return), but it should still work.

I did that, but now have a further difficulty. I had to add a rootHintsServer
option to specify the nameserver to use for getting the root hints. If I
specify a DNS name (e.g. k.root-servers.net), preStart is unable to resolve
it, and so bind fails to install (if I specify an IP address, it works fine).
The problem is that /etc/resolv.conf points to localhost, but bind is not yet
working there. nixos must have a way around this kind of bootstrap problem,
otherwise it would have difficulty downloading the source code for bind. Is
there a nix function I can use to get rootHintsServer resolved to an IP
address, before putting it into preStart ?

Tim
---


More information about the nix-dev mailing list