Re: why are there 2 resolv.conf files?
From: Rick (rick_at_none.com)
Date: 07/01/04
- Next message: Kip Rugger: "Re: Telinit question (affects X and networking)"
- Previous message: Steen Suder, privat: "Bugs 2.4.20 -> 2.4.25?"
- In reply to: Bill Unruh: "Re: why are there 2 resolv.conf files?"
- Next in thread: Marc Schwartz: "Re: why are there 2 resolv.conf files?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 01 Jul 2004 20:57:40 GMT
On Thu, 01 Jul 2004 20:21:37 +0000, Bill Unruh wrote:
> Clifford Kite <kite@see.signature.id> writes:
>
> ]Rick <rick@none.com> wrote:
>
> ]> On my Fedora Core 1, there are 2 resolv.conf files. One is in /etc/ppp/,
> ]> which will get written to if usepeerdns in in options, and one in /etc,
> ]> which gets written to by dhcp-client script. PPP only seems to read the
> ]> /etc/resolv.conf.
>
> ]The one in /etc/ppp/resolv.conf is written by pppd. It's up to you or
> ]your distribution to do anything else.
>
> The system ONLY uses /etc/resolv.conf to do all of its internet dns lookup.
> That is the only file you need.
>
> pppd puts its msdns stuff into /etc/ppp/resolv.conf, because most people
> would get very upset to have their /etc/resolv.conf messed up by pppd.
> You thus have the info you need in /etc/ppp/resolv.conf if you want to use it.
> If you only ever use ppp to connect to any network, you could make
> /etc/resolv.conf a link to /etc/ppp/resolv.conf.
>
> Or you could put a program into /etc/ppp/ip-up to transfer the info from
> /etc/ppp/resolv.conf to /etc/resolv.conf when ppp comes up, and put another
> into /etc/ppp/ip-down to replace the old resolv.conf when ppp finishes.
> (This can leave things in a bad state if pppd gets killed for some reason--
> by a kill -9 for example)
>
>
>
> ]> Can anyone tell me why this is, or how to get usepeerdns to write to
> ]> /etc/resolv.conf?
>
> ]You can't, pppd only writes to /etc/ppp/resolv.conf.
>
> ]You could script a workaround in /etc/ppp/ip-up, assuming the format
> ]of /etc/ppp/resolv.conf is compatible with /etc/resolv.conf, by mv'ing
> ]/etc/ppp/resolv.conf to /etc/resolv.conf, or otherwise script to modify
> ]/etc/resolv.conf according to what's in the one pppd writes.
>
> ]You might also just sym-link /etc/resolv.conf to /etc/ppp/resolv.conf.
> ]But I don't know whether the format of the second is compatible with
> ]the first - I've never used usepeerdns.
>
> ]You don't need to change /etc/resolv.conf unless you have more than
> ]one ISP. Or if you do, then it should be very, very, very seldom.
>
> AGreed. Ie, the best idea is probably to take the info in
> /etc/ppp/resolv.conf, transfer it to /etc/resolv.conf and forget about it.
> Or just forget about using msdns at all, since you seem to already have a
> dhcp link anyway.
The computer that is having this problem is a latop. I use wifi with it at
home, but I have to dial on the road. I think I am just going to copy the
/etc/ppp/resolv over the /etc/resolv.conf either manually or by script
when I use ppp. The DHCP-client script will overwrite it by itself.
Thanks for the help, all.
-- Rick
- Next message: Kip Rugger: "Re: Telinit question (affects X and networking)"
- Previous message: Steen Suder, privat: "Bugs 2.4.20 -> 2.4.25?"
- In reply to: Bill Unruh: "Re: why are there 2 resolv.conf files?"
- Next in thread: Marc Schwartz: "Re: why are there 2 resolv.conf files?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|