[Samba] [Fwd: Samba-3 By Ex Chapt 3]
Eric Hines
eehines at comcast.net
Wed Jul 6 22:20:02 GMT 2005
I tried both versions of /etc/dhclient-enter-hooks below, and in each
case, following a reboot my /etc/resolv.conf was overwritten to its
original form by dhclient-script.
Unless this is related to my DNS functionality, which I've written IAW
BYEXAMPLE Chapt 3 (although, apparently not, as it doesn't work), not
working, I'd just as soon focus on that, for the time being. Thanks for
all the help on /etc/resolv.conf, though, that most assuredly was not
time wasted. It'll be useful when I come back to this problem.
Eric Hines
Dwight Tovey wrote:
>Eric Hines said:
>
>
>><snip>
>>So I remain with the problems that I have no DNS resolution capability,
>>and I cannot edit, with permanence, /etc/resolv.conf. I'd probably be
>>satisfied with the latter if I could get DNS to work.
>>
>>
>>
>You can tell dhclient to get the IP address and gateway info, but to
>ignore what the server tells it to do for the DNS server. Look at the man
>pages for dhclient-script. If you create an executable script called
>/etc/dhclient-enter-hooks and in there define the function
>'make_resolv_conf()', you can override how your /etc/resolv.conf gets
>handled. I have one on a FC3 machine at home. I can't get to it at the
>moment, but from memory I believe that you can do something like this in
>dhclient-enter-hooks:
>
>===================================8<---------------------------------
>#!/bin/bash
>
>make_resolv_conf() {
>cat > /etc/resolv.conf <<EOF
>search mydomain.net
>nameserver 192.168.52.1
>EOF
>}
>
>===================================8<---------------------------------
>
>Of course, you could also just define make_resolv_conf() as an empty
>function and it will just leave the current /etc/resolv.conf alone.
>
> /dwight
>
>
--
He can compress the most words into the smallest ideas of any man
I ever met.
- Abraham Lincoln
More information about the samba
mailing list