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

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



On Tue, Sep 09, 2003 at 01:34:59PM -0700, Kevin Buhr wrote:
...
> Try adding two lines to the beginning of that function:
> 
> make_resolve_conf() {
>   echo new_domain_name="$new_domain_name" > /etc/resolv.log
>   echo new_domain_name_servers="$new_domain_name_servers" >>/etc/resolv.log
>   . . . 
> 
> and bring the interface "ifdown" and back "ifup".  Make sure that
> "/etc/resolv.log" is created and that it shows that both variables
> have been assigned non-null values.  It may be that your ISP's DHCP
> server is simply not configured to provide both pieces of requested
> information, even when asked.

Ah.  No domain name provided, so the test fails.

> If the problem is that its supplying the servers but not the domain
> name, replace the whole function with:
> 
> make_resolve_conf() {
>   if [ x"$new_domain_name_servers" != x ]; then
>     > /etc/resolv.conf
>     chmod 644 /etc/resolv.conf
>     for nameserver in $new_domain_name_servers; do
>       echo nameserver $nameserver >>/etc/resolv.conf
>     done
>   fi
> }

This I tried, but still nothing gets written to the file.  Hmm.  It didn't
even wipe the contents.  So there appears to be something funky in the
original test.  Oh well.
...

> Well, you should be able to determine your new ISP's DNS servers and
> hardcode them manually.  Try "host dns.yourisp.net", "host
> dns1.yourisp.net", or "host dns2.yourisp.net" and try out those IP
> addresses.  Or, take a peek at your ISP's support pages.  They
> probably have it documented somewhere.

I've hardcoded the original DNS's I got from the above log file into
resolv.conf and things seem to be working fine.

Thanks very much for the guidance, Kevin!


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: