Hello, Many modern systems have their /etc/resolv.conf files autogenerated at runtime with DHCP, PPP or so on. Thus, storing that file in /etc seems no longer correct as that directory may be mounted read-only.
I'm attaching a net-dns/resolvconf-symlink ebuild which replaces /etc/resolv.conf with a symlink to a runtime-writable location when installed. That package could be added to PDEPEND of packages like net-misc/networkmanager or net-dns/openresolv. Right now, that location is /var/run/resolv.conf. Using /run seems better for it but that directory is not yet in our baselayout. The package has USE=symlink which could be disabled by users which want to keep /etc/resolv.conf as-is. Right now, pkg_preinst() ensures that /etc/resolv.conf is autogenerated (tested with resolvconf and networkmanager) or doesn't exist and refuses to install otherwise. In future, this will be expanded to support more cases if necessary. In addition to that, pkg_preinst() and pkg_postrm() handle moving resolv.conf there and back to avoid leaving user with no nameservers. I also covered a similar idea in bug #377595 [1]. [1]:https://bugs.gentoo.org/show_bug.cgi?id=377595 -- Best regards, Michał Górny
resolvconf-symlink-0.ebuild
Description: Binary data
signature.asc
Description: PGP signature
