Subject: Re: dhclient-script question regarding resolv.conf
To: Christos Zoulas <christos@zoulas.com>
From: Ian Thomas <ipthomas@mac.com>
List: netbsd-users
Date: 03/26/2004 14:24:51
On Mar 26, 2004, at 1:37 PM, Christos Zoulas wrote:

> In article <3CB0E18E-7F4F-11D8-BD1D-000393CD2240@mac.com>,
> Ian Thomas <ipthomas@mac.com> wrote:
>> 	In the script, dhclient-script, where does this script get the values
>> for the variables: new_domain_name and new_domain_name_servers?  It
>> appears that if these values are empty, /etc/resolv.conf is not 
>> created
>> and populated with information.
>> 	My reason for asking is that the file, /etc/resolv.conf, is not being
>> populated with this information after startup when the command,
>> dhclient, is run.  Running dhclient from the command line doesn't make
>> any difference.  I have had the same results with no 
>> /etc/dhclient.conf
>> file and one that has values in it.
>> 	As a stop gap measure, I am using an AWK script that parses the file
>> /var/db/dhclient.leases and fills in /etc/resolv.conf with the
>> appropriate values.  My script is called in /etc/rc.local after
>> startup.  This seems to be working fine now, but, all the other
>> information regarding dhclient that I have read claims that the
>> dhclient-script is supposed to fill in the values for resolv.conf.  I
>> would like to use that solution instead, if possible, as I'm no expert
>> with AWK and may have subtle errors in my script that won't show up
>> until sometime later.
>
> What do you have in /etc/dhclient.conf?
>
> christos

The contents of /etc/dhclient.conf

# DHCP setup options.
interface "rtk0"
{
	send host-name "my.domain.org";
         	request subnet-mask, broadcast-address, routers, 
domain-name-servers;
         	require subnet-mask, domain-name-servers;
         	script  "/sbin/dhclient-script";
}


Ian