/usr/share/doc/HOWTO/ja-html/DNS-HOWTO-8.html is in doc-linux-ja-html 2006.05.25-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>DNS HOWTO : $B%a%s%F%J%s%9(B</TITLE>
<LINK HREF="DNS-HOWTO-9.html" REL=next>
<LINK HREF="DNS-HOWTO-7.html" REL=previous>
<LINK HREF="DNS-HOWTO.html#toc8" REL=contents>
</HEAD>
<BODY>
<A HREF="DNS-HOWTO-9.html">$B<!$N%Z!<%8(B</A>
<A HREF="DNS-HOWTO-7.html">$BA0$N%Z!<%8(B</A>
<A HREF="DNS-HOWTO.html#toc8">$BL\<!$X(B</A>
<HR>
<H2><A NAME="maint"></A> <A NAME="s8">8. $B%a%s%F%J%s%9(B</A></H2>
<P><B>$BF0:n$r0];}$9$k$?$a$K(B</B>
<P>
<P>named $B$K$O!"$?$@Av$i$;$k0J30$K$b0l$DJ]<i:n6H$,$"$j$^$9!#(B
<CODE>root.hints</CODE> $B%U%!%$%k$r:G?7$N>uBV$KJ]$D:n6H$G$9!#(B
$B0lHV4JC1$J$N$O(B <CODE>dig</CODE> $B$r;H$&$d$jJ}$G$9!#$^$:0z$-?t$J$7$G(B
<CODE>dig</CODE> $B$rF0$+$9$H!"8=:_%5!<%P$G;H$C$F$$$k(B
<CODE>root.hints</CODE> $B$NFbMF$,I=<($5$l$^$9!#(B
$B<!$K%j%9%H$5$l$F$$$k%k!<%H%5!<%P$N$$$:$l$+$KBP$7$F(B <CODE>dig @rootserver</CODE>
$B$N$h$&$KLd$$9g$o$;$r9T$$$^$9!#(B
$B=PNO7k2L$O(B <CODE>root.hints</CODE> $B$NFbMF$K$H$F$b$h$/;w$F$$$k$O$:$G$9!#(B
$B$3$N7k2L$r(B <CODE>dig @e.root-servers.net . ns > root.cache.new</CODE>
$B$N$h$&$KJ]B8$7$F!"8E$$(B <CODE>root.hints</CODE> $B$HCV$-49$($^$9!#(B
<P>
<P>$B%-%c%C%7%e%U%!%$%k$rF~$lBX$($?8e$K$O(B
named $B$K:FFI$_9~$_$5$;$k$N$r$*K:$l$J$/!#(B
<P>
<P>Al Longyear $B$,%9%/%j%W%H$rAw$C$F$/$l$^$7$?!#<+F0E*$K(B
<CODE>root.hints</CODE> $B$r99?7$7$F$/$l$k$b$N$G$9!#(B
$B$3$l$r7n$K0lEY5/F0$9$k(B crontab $B$N%(%s%H%j$r%$%s%9%H!<%k$9$l$P!"(B
$B8e$OA4It$*$^$+$;$G$9!#%9%/%j%W%H$G$O!"%a!<%k$,$A$c$s$HF0:n$7$F$$$F!"(B
$B%a!<%k%(%$%j%"%9$H$7$F(B `hostmaster'
$B$,Dj5A$5$l$F$$$k$3$H$rA0Ds$H$7$F$$$^$9!#(B
$B$"$J$?$N@_Dj$K$"$o$;$F%O%C%/$9$kI,MW$,$"$j$^$9!#(B
<P>
<HR>
<PRE>
#!/bin/sh
#
# Update the nameserver cache information file once per month.
# This is run automatically by a cron entry.
#
# Original by Al Longyear
# Updated for BIND 8 by Nicolai Langfeldt
# Miscelanious error-conditions reported by David A. Ranch
# Ping test suggested by Martin Foster
# named up-test suggested by Erik Bryer.
#
(
echo "To: hostmaster <hostmaster>"
echo "From: system <root>"
# Is named up? Check the status of named.
case `rndc status 2>&1` in
*refused*)
echo "named is DOWN. root.hints was NOT updated"
echo
exit 0
;;
esac
PATH=/sbin:/usr/sbin:/bin:/usr/bin:
export PATH
# NOTE: /var/named must be writable only by trusted users or this script
# will cause root compromise/denial of service opportunities.
cd /var/named 2>/dev/null || {
echo "Subject: Cannot cd to /var/named, error $?"
echo
echo "The subject says it all"
exit 1
}
# Are we online? Ping a server at your ISP
case `ping -qnc 1 some.machine.net 2>&1` in
*'100% packet loss'*)
echo "Subject: root.hints NOT updated. The network is DOWN."
echo
echo "The subject says it all"
exit 1
;;
esac
dig @e.root-servers.net . ns >root.hints.new 2> errors
case `cat root.hints.new` in
*NOERROR*)
# It worked
:;;
*)
echo "Subject: The root.hints file update has FAILED."
echo
echo "The root.hints update has failed"
echo "This is the dig output reported:"
echo
cat root.hints.new errors
exit 1
;;
esac
echo "Subject: The root.hints file has been updated"
echo
echo "The root.hints file has been updated to contain the following
information:"
echo
cat root.hints.new
chown root.root root.hints.new
chmod 444 root.hints.new
rm -f root.hints.old errors
mv root.hints root.hints.old
mv root.hints.new root.hints
rndc restart
echo
echo "The nameserver has been restarted to ensure that the update is complete."
echo "The previous root.hints file is now called
/var/named/root.hints.old."
) 2>&1 | /usr/lib/sendmail -t
exit 0
</PRE>
<HR>
<P>$BLuCm(B: $BLu<T$O$^$@(B BIND 8 $B$J$N$G$3$N%9%/%j%W%H$r;n$7$F$$$J$$$N$G$9$,!"(B
<CODE>rndc restart</CODE> $B$H$$$&%3%^%s%I$O(B <CODE>rndc stop; named</CODE>
$B$GCV$-49$($J$$$H$$$1$J$$$h$&$J5$$,$7$^$9!#(B
<P>
<P><CODE>root.hints</CODE> $B$O(B Internic $B$+$i(B ftp $B$G$bF~<j$G$-$k!"(B
$B$H8@$&$3$H$r$9$G$K$4B8$8$NJ}$b$$$k$+$b$7$l$^$;$s!#(B
$B$G$9$,(B <CODE>root.hints</CODE> $B$N99?7$K(B ftp $B$O;H$o$J$$$h$&$K$7$F$/$@$5$$!#(B
$B>e5-$NJ}K!$N$[$&$,!"$:$C$H!V%M%C%H(B ($B$H(B Internic) $B$KM%$7$$!W$N$G$9!#(B
<P>
<HR>
<A HREF="DNS-HOWTO-9.html">$B<!$N%Z!<%8(B</A>
<A HREF="DNS-HOWTO-7.html">$BA0$N%Z!<%8(B</A>
<A HREF="DNS-HOWTO.html#toc8">$BL\<!$X(B</A>
</BODY>
</HTML>
|