FS#25256 - [ppp] Replace a file "/etc/resolv.conf" by default is a bad idea.
Attached to Project:
Arch Linux
Opened by Natrio (natrio) - Monday, 25 July 2011, 14:30 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 18 November 2012, 23:06 GMT
Opened by Natrio (natrio) - Monday, 25 July 2011, 14:30 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 18 November 2012, 23:06 GMT
|
Details
Description:
This "feature" that was added in version 2.4.4-8 Arch-package (but not into upstream!), conflicts with any local DNS-server. You can't get DNS from peer into "/etc/ppp/resolv.conf" without replacing the main "/etc/resilv.conf" file! Of course, you can not get the file "/etc/ppp/resolv.conf" at all, because the file has already moved. This is a wrong way. The files "/etc/ppp/ip-*.d/00-dns.sh" can to be added optionally, but not by default. And even better - just once to create a link, if necessary: ln -s /etc/ppp/resolv.conv /etc/ Additional info: * package version(s): 2.4.4-8 and higher |
This task depends upon
See man pppd:
usepeerdns
Ask the peer for up to 2 DNS server addresses. The addresses
supplied by the peer (if any) are passed to the /etc/ppp/ip-up
script in the environment variables DNS1 and DNS2, and the envi‐
ronment variable USEPEERDNS will be set to 1. In addition, pppd
will create an /etc/ppp/resolv.conf file containing one or two
nameserver lines with the address(es) supplied by the peer.
And then activated script 00-dns.sh, which makes it like this:
mv /etc/ppp/resolv.conf /etc/resolv.conf
This action is clearly beyond what is described in "man pppd" (and Arch-wiki too), it is useless and harmful.
The practice of automatically rewriting the basic configuration files are completely flawed.