Re: why are there 2 resolv.conf files?

From: Clifford Kite (kite_at_see.signature.id)
Date: 07/02/04


Date: Thu, 1 Jul 2004 21:43:09 -0500

Marc Schwartz <MSchwartz@mn.rr.com> wrote:

> There was a thread on the Fedora e-mail list
> (http://www.redhat.com/archives/fedora-list/2004-June/msg07831.html) which
> contained a script called /etc/ppp/ip-up.local, which is referred to in
> 'man pppd' and has seemed to be helpful:

> #!/bin/bash
> # /etc/ppp/ip-up.local
>
> PATH=/sbin:/usr/sbin:/bin:/usr/bin
> export PATH
>
> echo "Created by pppd and $0" > /etc/resolv.conf
> echo "nameserver ${DNS1}" >> /etc/resolv.conf
> echo "nameserver ${DNS2}" >> /etc/resolv.conf
> chmod go+r /etc/resolv.conf

A slight variation on this could also provide for a permanent resolver
options configuration. One way would be to place just the options in
a file, say /etc/resolv.opts, and use the above script with the first
line replaced by "cp -a /etc/resolv.opts /etc/resolv.conf" so that
the options would be retained as well as the DNS nameservers added.
I think the last line could then be omitted (or replaced by the first
line but using ">>" instead of ">").

Since it is a comment, the first line should really begin with a "#",
but perhaps the resolver library just ignores something it doesn't
understand at all.

There are also distributions that don't use /etc/ppp/ip-up.local, and
the body of the script then should be a part of /etc/ppp/ip-up.

-- 
Clifford Kite                Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
PPP-Q&A links, downloads:                      http://ckite.no-ip.net/


Relevant Pages

  • Re: why are there 2 resolv.conf files?
    ... > 'man pppd' and has seemed to be helpful: ... A slight variation on this could also provide for a permanent resolver ... the body of the script then should be a part of /etc/ppp/ip-up. ...
    (linux.redhat.misc)
  • Re: dialup solution (as seconary connection / iptables )
    ... ip-down is launched by pppd only after the PPP link no longer available ... first with MINICOM or is PAP and script not mutualy exclusive? ... do have to "make the connection first with MINICOM." ... If you use the Linux box and route the news IP address to it on each ...
    (comp.os.linux.networking)
  • Re: pppd pty equivilent in FBSD
    ... I let pppd manage retries & setting routes. ... >I wouldn't personally recommend vpn over ssh for anyone either, ... I'm the sole bsd user at my company, and the ppp over ssh ... >Actual bash script I call: ...
    (freebsd-net)
  • Re: Modem--pppd Died Unexpectedly
    ... PAP authentication is rejected by pppd above. ... If you want to try a script, the ppp-secrets.gz script found at my ... To get chat log messages the S in the chat -vsS parameter must be removed. ...
    (comp.os.linux.networking)
  • Re: Emulating a modem with expect
    ... > (basically allows GUI connections via telnet if X is not allowed). ... > script works fine on Linux machines since it makes a call to pppd on both ... > Basically pppd on Linux creates a ppp0 interace automatically, ... > Once chat finishes the phyiscal connection of dialing, ...
    (comp.lang.tcl)