On Thursday, February 7, 2019 at 3:48:32 AM UTC-5, Nadav Har'El wrote: > > > I think the easiest and perhaps best approach would be to have the DHCP > client write a file /etc/resolv.conf when it discovers the DNS server? This > is what happens in my Linux system - the /etc/resolv.conf on my laptop has: > > # Generated by NetworkManager > nameserver 192.168.0.1 >
This is certainly the standard behavior for every UNIX system I've ever used - Probably because ISC did it that way. > To support the case where the /etc filesystem is read-only, we can do the > following: In the read-only filesystem, put in /etc/resolv.conf a symbolic > link to /tmp/resolv.conf, assuming we always mount a writable /tmp. Then, > when dhcp.cc will write to "/etc/resolv.conf" (overwritten, e.g., open() > with O_TRUNC), it will actually write to that file on /tmp and succeed. > Ha - That's quite a bit easier than the path I was thinking of, trying to write some sort of mmap'ed VFS hack to point /etc/resolv.conf to a blob of kernel memory. This is definitely a better approach. Are we guaranteed that every OSv instance will have a writable /tmp directory? Is that a part of the core manifest? -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
