Re: RedHat DHCP overwriting resolv.conf

Dave Bresson (david.bresson@yale.edu)
Thu, 22 Apr 1999 19:43:03 -0400 (EDT)

On Thu, 22 Apr 1999, Matthew Hiller wrote:

> Chad and I had an e-mail exchange about this earlier this year --
> in the pre-Linux list days -- essentially, (on RH 5.1 at least), you just
> need to hack up /etc/sysconfig/network-scripts/ifdhcpc-done a little bit.
>
> Comment out the following lines:
>
> #if [ -f /etc/dhcpc/resolv.conf ]; then
> # cp /etc/dhcpc/resolv.conf /etc
> #fi
>

yeah, I noticed that too, but I didn't think much of it because at least
on my machine, there isn't even a /etc/dhcpc directory, much less a
/etc/dhcpc/resolv.conf file! I'm not sure why that is, is that I file it
just temporarily creates there when the client first talks to the server
and gets the ip and then is removed?

> Note that the file (here at laest) is actually overwritten -
> there's no symlink involved.
>
> And, if you have a vanity domain name, you just need to add some
> lines to the end of the file to be sure it's set correctly, which'll be
> something along the lines of:
>
> export HOSTNAME=foo.br.yale.edu
> hostname foo.br.yale.edu
>

thanks for the tip, although my dhcp is working without me doing any
special handling for my vanity ip, I do know that it has my hostname
wrong.

dave