<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/06/12 07:06, Timothe Litt wrote:<br>
</div>
<blockquote cite="mid:186D3E96DD934122AA5D8ACD8B12B4A7@sb.litts.net"
type="cite">
<pre wrap="">In doing some system administration, I realized that I have a tool that
might be
generally useful - ISC is welcome to add it to contribs. Hopefully the
attachment
will make it through the mailing list server.
This is a script to automagically update the root hints file. There are a
bunch of these floating around the internet; most don't work; those that do
don't work well. I wrote this several years ago; it's worked for me.
It will FTP the new file - or, if you value speed over comments, will
fabricate
a copy from the existing root servers - yes, it will deal with the case
that a root server is renumbered or returns partial data. It acts as a
SYS V init script so that it runs on every boot; It's smart enough to
requeue itself hourly if it fails to get data. It verifies FTP transfers.
It also runs as a cron job monthly to catch any updates. It will log
actions
to syslog; will also send mail if you like. It preserves file ownership and
the timestamp of last download. It knows to run rndc reconfig when it gets
a new file. (And not when nothing has changed.)
I did some cleanup for this release, but the core logic has run for several
years on Fedora and random embedded Linuxes. For me, it's install & forget.
README:
Install it (or create a link to it) in /etc/init.d/ as update_root. E.g. if
it's
in /usr/local/sbin, then
ln -sf ../../../usr/local/sbin/update_root /etc/init.d/
Then execute
/etc/init.d/update_root setup
and
/etc/init.d/update_root
Create a /etc/sysconfig/update_root file if you want a non-default
configuration.
The most useful configuration variables are:
# Undefined uses FTP (default)
#USEDNS=yes
# Root file name
HINT=ROOT.HINT
# named control address (undef for none)
NAMEDRNDC="127.0.0.1"
# Root file owner
DEFAULTOWNER="named:named" (When there's no file; normally copies from old)
# Define for e-mail recipient (default is undef => none)
#TO=hostmaster@example.com
# Cron directories
CRONMONTHLY="/etc/cron.monthly"
CRONHOURLY="/etc/cron.hourly"
# No IPV6? This may speed FTP connections.
WGET="$WGET -4"
Other parameters are in the first ~80 lines of the script.
The script commands are:
start - check for update (default if no command)
setup - run chkconfig and link to monthly queue (don't if you use crontab)
status - list current file
One caution: Do not copy the script using copy & paste; there are places
where
literal tabs and spaces are important. [Some environments have very limited
regexps.]
It's freely redistributable, with the usual caveat that there is no warranty
or
promise of support & that you use it at your own risk.
Enjoy.
Timothe Litt
ACM Distinguished Engineer
---------------------------------------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Please visit <a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/bind-users">https://lists.isc.org/mailman/listinfo/bind-users</a> to unsubscribe from this list
bind-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:bind-users@lists.isc.org">bind-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/bind-users">https://lists.isc.org/mailman/listinfo/bind-users</a></pre>
</blockquote>
Nice script. Now my pet peeve time<GRIN>.<br>
<br>
This file:<br>
<a class="moz-txt-link-freetext" href="http://www.internic.net/domain/named.root">http://www.internic.net/domain/named.root</a><br>
<br>
indicates the named.root file should be available at
<a class="moz-txt-link-abbreviated" href="ftp://ftp.internic.net">ftp.internic.net</a> or rs.internic.net. It's only at <a class="moz-txt-link-abbreviated" href="ftp://ftp.internic.net">ftp.internic.net</a>.<br>
<br>
This page has a pointer to root hints file(via FTP) that does not
work either. The http version shows the above mistake. It's not
available at rs.internic.net.<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.iana.org/domains/root/files">http://www.iana.org/domains/root/files</a> <br>
<br>
Lyle Giese<br>
LCR Computer Services, Inc.<br>
<br>
</body>
</html>