Networking Forums

Networking Forums > Computer Networking > Linux Networking > dhcpd.conf, resolv.conf and the search directive

Reply
Thread Tools Display Modes

dhcpd.conf, resolv.conf and the search directive

 
 
Andy Richardson
Guest
Posts: n/a

 
      07-12-2005, 04:51 PM
Hi folks quick question,

Is there any way to automatically populate resolv.conf with more than
one search domain.

Currently it is given the value of the domain-name option from
dhcpd.conf, but I need the resolver to search two domains for a hostname.




--
Andy Richardson

Never criticize a man 'til you've walked a mile in his shoes.
After that, you can say what you want..
'cos you're a mile away and you've got his shoes.
 
Reply With Quote
 
 
 
 
Unruh
Guest
Posts: n/a

 
      07-12-2005, 05:11 PM
Andy Richardson <(E-Mail Removed)> writes:

>Hi folks quick question,


>Is there any way to automatically populate resolv.conf with more than
>one search domain.


Write a script. run it whenever the system boots, or runs dhcp


>Currently it is given the value of the domain-name option from
>dhcpd.conf, but I need the resolver to search two domains for a hostname.




 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      07-12-2005, 05:39 PM
On Tue, 12 Jul 2005 17:51:45 +0100, Andy Richardson wrote:
> Hi folks quick question,
>
> Is there any way to automatically populate resolv.conf with more than
> one search domain.


Yes.

>
> Currently it is given the value of the domain-name option from
> dhcpd.conf, but I need the resolver to search two domains for a hostname.


my preference was to remove the search line to speed up all the
external values.

do a
man (your_dhcp_client_daemon_here)
to see if it indicats a file which runs after it obtains a lease.
The script would be as simple as

echo "search whatever you like here" > /tmp/resolv.conf
grep -v search /etc/resolv.conf >> /tmp/resolv.conf
/bin/cp /tmp/resolv.conf /etc/resolv.conf
 
Reply With Quote
 
Mr. Boy
Guest
Posts: n/a

 
      07-12-2005, 09:43 PM
dude, instead of having two domains why dont you setup 2 subdomains
within a single domain?
and setup a small dns server with a single zone and a couple of
subdomains... or using /etc/hosts (if ip addresses are not dynamic)

 
Reply With Quote
 
Andy Richardson
Guest
Posts: n/a

 
      07-13-2005, 08:23 AM
Thanks people,
running a script after dhcpcd has run was going to be my preferred option.
I was just hoping there would be some neat little option in dhcpd.conf
that would populate resolv.conf fully.
Cheers again

--
Andy Richardson

Never criticize a man 'til you've walked a mile in his shoes.
After that, you can say what you want..
'cos you're a mile away and you've got his shoes.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vpnc and resolv.conf blueparty Linux Networking 6 11-10-2011 07:07 PM
search path in resolv.conf overwritten by the hostname after reboot powah Linux Networking 2 04-15-2009 10:19 PM
FC3 wiping its own resolv.conf David Bromage Linux Networking 8 07-25-2005 10:24 AM
resolv.conf Stephen Speicher Linux Networking 5 12-10-2003 09:00 AM
NIS, DNS and resolv.conf ncrfgs Linux Networking 2 10-02-2003 05:09 PM



1 2 3 4 5 6 7 8 9 10 11