[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

**Getting** dhcp to write /etc/resolv.conf



I feel as though I'm going around in circles right now about something
perhaps not that important, but I also want to understand what's going on
with dhclient...

We have switched to cable from dialup, and I felt grand about the system
coming up with no problems the first time (modem/ethernet to two ethernet
cards with dhcp).  But I just recently realized that dhclient is not
rewriting /etc/resolv.conf to reflect the new isp's dns servers.

/etc/resolv.conf has 644 permissions.

I have uncommented the line in /etc/dhcp3/dhclient.conf asking for the DNS
and domain-name (among other things) to no avail.

I have tried to move the startup of shorewall from being included in the 
/etc/network/interfaces file to /etc/network/if-up.d as a script with weird
results (being called twice) as a way to change its influence (if any) on
the operating calls of dhclient (restarting networking seems to work
weird--I 

I also uncommented the line in dhclient.conf about the location of the
script. Combined with the shorewall startup, it loses the isp dhcp server
(66.XXX.XXX.XXX) and gets an address renewal (same IP) from some
10.XXX.XXX.XXX server.

???

The only thing I can see which appears a bit odd is a line in the
dhclient-script:

make_resolv_conf() {
  if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
       ^^^^^       compared with       ^^^^^^^
    echo search $new_domain_name >/etc/resolv.conf

Could this be killing the rewriting, or (since I'm barely out of diapers on
the topic of shell scripting) do I simply not understand the logical
differences in the above two comparisons?

I really don't know what else to look at at this point.  Nothing in the man
pages has helped to show me other things to try. 

I _could_ keep running off the old isp's DNS, but that doesn't feel right,
and I think it contributes to some latency (not critical to me, but my wife
keeps looking for the perfect shopping experience... :)

Is there something obvious I'm missing, or can do to have this work?


Kenward
-- 
In a completely rational society, the best of us would aspire to be 
_teachers_ and the rest of us would have to settle for something less, 
because passing civilization along from one generation to the next 
ought to be the highest honor and the highest responsibility anyone 
could have.     - Lee Iacocca



Reply to: