On Fri, 22 Mar 2002, Erich Titl wrote:

--> Date: Fri, 22 Mar 2002 08:31:37 +0100
--> From: Erich Titl <[EMAIL PROTECTED]>
--> To: [EMAIL PROTECTED]
--> Subject: [Leaf-user] Re: Leaf-user digest, Vol 1 #746 - 4 msgs
--> 
--> At 12:15 21.03.2002 -0800, you wrote:
--> 
--> >Message: 3
--> >Date: Thu, 21 Mar 2002 13:35:57 -0600 (CST)
--> >From: w <[EMAIL PROTECTED]>
--> >To: [EMAIL PROTECTED]
--> >Subject: [Leaf-user] dnscache/tinydns for dhcp aquired dns servers
--> >
--> >Hi,
--> >
--> >I have a question I hope someone can help me with.  Here goes:
--> >
--> >I'm running dachstein on a 1722K floppy, with dhclient.lrp,
--> >dhcpd.lrp, daemontl.lrp, tinydns.lrp and dnscache.lrp.  Currently
--> >I'm in the testing phase, but I hope to use this setup in a
--> >couple of situations soon.
--> >
--> >Question:
--> >
--> >DMACHINE, (Better know as my dachstein 233MHZ machine), uses
--> >the dhclient to obtain an IP for it's eth0 interface.  Also in
--> >the lease information, is the external DNS server IP(s).
--> >Normally, the dhclient would update /etc/resolv.conf with this
--> >DNS information, but I've turned this functionality off, and
--> >instead have an resolv.conf entry point to my eth1 interface,
--> >on which dnscache is running.  dnscache uses tinydns, (running
--> >on the loopback interface), for my internal network DNS resolution.
--> >
--> >I would like dnscache to use the DNS server IP(s) in the lease
--> >information for external resolution, (without manually updating
--> >the configuration).  One way to do this is to update
--> >/etc/dnscache/env/DNS0 (or /etc/dnscache/env/DNS1) after
--> >the dhcplient lease has been aquired, and start/restart the
--> >dnscache server.
--> >
--> >Is "something" like this functionality already implemented?
--> >
--> >
--> >Much thanks guys and gddals
--> >
--> >Will
--> 
--> Add something like
--> 
--> echo $new_ip_address > /etc/dnscache/env/DNS0
--> 
--> to your /etc/dhclient-exit-hooks file and restart dnscache
--> 
--> HTH
--> 
--> Erich
--> 

I'm thinking, (but not sure), the following occurs:

"/etc/init.d/dhclient" calls "/usr/sbin/dhclient" which reads the
dhclient.conf file and also parses the ISP lease info.  Because
I'm using the "supersede domain-name-servers" directive in the
dhclient.conf file, I'm thinking the variable that should hold
the nameserver(s) from the ISP lease info, instead contain the
nameserver(s) from the dhclient.conf file "BEFORE" control is
passed to the "/etc/dhclient-script".  I believe only
"/etc/dhclient-script" calls/sources "dhclient-exit-hooks" but
at this point, only the nameservers I've explicitly specified
in the "dhclient.conf" file have are avaliable to 
"/etc/dhclient-script".  So effectively the ISP nameserver(s)
in the lease info have been "lost" unless I change and recompile
"/usr/sbin/dhclient", (which "I" have NO plans of doing).

So it may be possible to "reaquire" this info directly from
the "dhclient.leases" file, but I don't know if its a good idea
to do this, and I also don't know at what point during the above
process would I do this.

Does this only make sence in my twisted twisted brain?
Please help.........

Will


_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to