dhcp-client passing ISP dsn info to dhcpd

Glenn Satchell Glenn.Satchell at uniq.com.au
Thu Apr 27 15:09:38 UTC 2006


>    
>    # replace dhcpd.conf include file contents (should be one long line)
>    echo "option domain-name-servers $new_domain_name_servers ;" > 
/etc/dhcpd.name-servers.tmp

Oops, just realised that there will need to be a comma separating any
ip addresses in the file. I think this might do it, but there could be
other spaces in there...

my_domain_name_servers=`echo $new_domain_name_servers | sed -e 's/ /, /g'`
echo "option domain-name-servers $my_domain_name_servers ;" > 
/etc/dhcpd.name-servers.tmp

On reflection, it might be better to put all the changes in
/etc/dhclient-exit-hooks, creating it if it doesn't exist. That script gets 
called from dhclient-script.

regards,
-glenn



More information about the dhcp-users mailing list