On 9/28/06, Jonathan Oksman <[EMAIL PROTECTED]> wrote:
> Dan Nicholson wrote:
> > Yeah, the dhclient script is pretty crappy. I think you did the same
> > thing that Jürg Billeter was doing on Paldo. Here's a copy of that
> > patch:
> >
> > http://www.linuxfromscratch.org/~dnicholson/dhcp-3.0.3-dns-1.patch
Yeah, it's pretty much identical from the looks of it. I just noticed
this... it looks like Jürg got the permissions right as opposed to in
mine, so it's definitely a better candidate for the ticket already!
On 9/28/06, Bruce Dubbs <[EMAIL PROTECTED]> wrote:
> Personally, I don't reset my resolv.conf at all but use my ISP's dns
> server all the time. What's the advantage of using a new one at each
> boot? 100ms per query?
Well, it's not exactly a mission critical bug... but it broke on my
router whenever it needed it's monthly reset. Mostly though, I needed
the refresh on the resolv.conf to work properly since I switch
networks on occasion for testing and such and wanted it to work
seamlessly with this old router. This tweak seems to do the job.
Found one better. And it addresses Bruce's concern about rewriting
resolv.conf every time. And the source is upstream. I was just about
to commit the paldo patch when I went to ISC to see what the upstream
status is. Turns out there are two development releases out in the
past month.
http://www.isc.org/index.pl?/sw/dhcp/
So, I grabbed the latest development version and diffed the scripts.
See attached. Jonathan, could you test this out? I'm sure it works,
but it would be great to get another vote of confidence.
--
Dan
--- dhcp-3.0.4/client/scripts/linux 2006-10-14 03:09:56.000000000 -0700
+++ dhcp-3.1.0a1/client/scripts/linux 2006-07-21 19:24:16.000000000 -0700
@@ -23,17 +23,22 @@
# of the $1 in its args.
make_resolv_conf() {
- if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
- echo "; resolv.conf - generated by dhclient-script" >/etc/resolv.conf
- chmod 644 /etc/resolv.conf
- if [ "x$new_domain_name" != x ]; then
- echo search $new_domain_name >>/etc/resolv.conf
- fi
- if [ "x$new_domain_name_servers" != x ]; then
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ if [ x"$new_domain_name_servers" != x ]; then
+ cat /dev/null > /etc/resolv.conf.dhclient
+ chmod 644 /etc/resolv.conf.dhclient
+ if [ x"$new_domain_search" != x ]; then
+ echo search $new_domain_search >> /etc/resolv.conf.dhclient
+ elif [ x"$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+ echo search $new_domain_name >> /etc/resolv.conf.dhclient
fi
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf.dhclient
+ done
+
+ mv /etc/resolv.conf.dhclient /etc/resolv.conf
fi
}
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page