Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
To: buildroot@busybox.net
Subject: [Buildroot] pppd makefile moves /etc/PPP/resolv.conf
Date: Mon, 26 Jan 2015 11:09:31 -0300	[thread overview]
Message-ID: <54C64A9B.5050602@zacarias.com.ar> (raw)
In-Reply-To: <9F494D13-32F4-497C-A834-C60AA93406E9@nowonline.co.uk>

On 01/26/2015 10:27 AM, Lee Essen wrote:

> Hi Gustavo,
> 
> OK, makes sense, however doesn?t make it easy to do anything clever with resolv.conf.
> 
> In the standard DHCP client it?s actually the script and not the binary that creates resolv.conf so it?s really easy to control behaviour.
> 
> The problem with pppd is that if you don?t specify usepeerdns then you don?t get any information (and no env vars for the script) and you if you specify usepeerdns then it writes /etc/resolv.conf without a care!
> 
> The more I think about it, the more I think the problem is actually with pppd, and your ?multiple-pppd? example is another good use case that breaks, even with an unmodified pppd.
> 
> The best solution I can come up with is the use of a ?noresolv? option for ppp that says ?don?t create a resolve.conf file? ? then I don?t care where it points, it doesn?t write anything at all, yet the DNS vars are available to ppp-up. The default case also doesn?t break existing behaviour.
> 
> It?s a trivial patch that I?m happy to share if anyone is interested, otherwise I?ll just keep it in my tree.
> 
> Thanks,
> 
> Lee.

Hi again.
A quick fix might be to throw in an ip-up script that makes
/etc/resolv.conf (using $DNS1, $DNS2 and $USEPEERDNS i think) in the
pppd package, and make the binary write resolv.conf to some no-op like
/dev/null.
This way we still got the benefit of PnP-like dns configuration that can
be easily disabled by removing said script.
Regards.

  reply	other threads:[~2015-01-26 14:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26  6:49 [Buildroot] pppd makefile moves /etc/PPP/resolv.conf Lee Essen
2015-01-26 10:33 ` Gustavo Zacarias
2015-01-26 13:27   ` Lee Essen
2015-01-26 14:09     ` Gustavo Zacarias [this message]
2015-01-26 15:52       ` Lee Essen
2015-01-26 16:07         ` Gustavo Zacarias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C64A9B.5050602@zacarias.com.ar \
    --to=gustavo@zacarias.com.ar \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox