update-leap.html revision 1.1.1.9 1 1.1 christos <html lang="en">
2 1.1 christos <head>
3 1.1 christos <title>update-leap User's Manual</title>
4 1.1 christos <meta http-equiv="Content-Type" content="text/html">
5 1.1 christos <meta name="description" content="update-leap User's Manual">
6 1.1.1.5 christos <meta name="generator" content="makeinfo 4.7">
7 1.1 christos <link title="Top" rel="top" href="#Top">
8 1.1 christos <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 1.1 christos <meta http-equiv="Content-Style-Type" content="text/css">
10 1.1 christos <style type="text/css"><!--
11 1.1 christos pre.display { font-family:inherit }
12 1.1 christos pre.format { font-family:inherit }
13 1.1 christos pre.smalldisplay { font-family:inherit; font-size:smaller }
14 1.1 christos pre.smallformat { font-family:inherit; font-size:smaller }
15 1.1 christos pre.smallexample { font-size:smaller }
16 1.1 christos pre.smalllisp { font-size:smaller }
17 1.1.1.5 christos span.sc { font-variant:small-caps }
18 1.1.1.5 christos span.roman { font-family: serif; font-weight: normal; }
19 1.1 christos --></style>
20 1.1 christos </head>
21 1.1 christos <body>
22 1.1 christos <h1 class="settitle">update-leap User's Manual</h1>
23 1.1 christos <div class="node">
24 1.1 christos <p><hr>
25 1.1.1.5 christos <a name="Top"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Description">update-leap Description</a>,
26 1.1 christos Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27 1.1 christos Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
28 1.1.1.5 christos <br>
29 1.1 christos </div>
30 1.1 christos
31 1.1 christos <p>This document describes the use of the NTP Project's <code>update-leap</code> program.
32 1.1 christos
33 1.1.1.9 christos <p>This document applies to version 4.2.8p11 of <code>update-leap</code>.
34 1.1 christos
35 1.1 christos <div class="shortcontents">
36 1.1 christos <h2>Short Contents</h2>
37 1.1 christos <ul>
38 1.1 christos </ul>
39 1.1 christos </div>
40 1.1 christos
41 1.1 christos <ul class="menu">
42 1.1 christos <li><a accesskey="1" href="#update_002dleap-Description">update-leap Description</a>: Description
43 1.1 christos <li><a accesskey="2" href="#update_002dleap-Invocation">update-leap Invocation</a>: Invoking update-leap
44 1.1 christos </ul>
45 1.1 christos
46 1.1 christos <div class="node">
47 1.1 christos <p><hr>
48 1.1 christos <a name="update_002dleap-Invocation"></a>
49 1.1.1.5 christos <br>
50 1.1 christos </div>
51 1.1 christos
52 1.1 christos <h3 class="section">0.1 Invoking update-leap</h3>
53 1.1 christos
54 1.1 christos <p><a name="index-update_002dleap-1"></a><a name="index-leap_002dseconds-file-manager_002fupdater-2"></a>
55 1.1 christos
56 1.1 christos <p><code>update-leap</code>
57 1.1 christos will validate the file currently on the local system
58 1.1 christos and if necessary, updates leap-second definition file.
59 1.1 christos
60 1.1 christos <p>Ordinarily, the file is found using the "leapfile" directive in
61 1.1 christos <code>ntp.conf(5)</code>.
62 1.1 christos However, an alternate location can be specified on the command line.
63 1.1 christos
64 1.1 christos <p>If the file does not exist, is not valid, has expired, or is expiring soon,
65 1.1 christos a new copy will be downloaded. If the new copy validates, it is installed and
66 1.1 christos NTP is (optionally) restarted.
67 1.1 christos
68 1.1 christos <p>If the current file is acceptable, no download or restart occurs.
69 1.1 christos
70 1.1 christos <p>-c can also be used to invoke another script to perform administrative
71 1.1 christos functions, e.g. to copy the file to other local systems.
72 1.1 christos .PP
73 1.1 christos This can be run as a cron job. As the file is rarely updated, and leap
74 1.1 christos seconds are announced at least one month in advance (usually longer), it
75 1.1 christos need not be run more frequently than about once every three weeks.
76 1.1 christos .PP
77 1.1 christos For cron-friendly behavior, define CRONJOB=1 in the crontab.
78 1.1 christos .PP
79 1.1 christos This script depends on$REQUIREDCMDS
80 1.1 christos
81 1.1 christos <p>This section was generated by <strong>AutoGen</strong>,
82 1.1 christos using the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program.
83 1.1 christos
84 1.1 christos <ul class="menu">
85 1.1.1.5 christos <li><a accesskey="1" href="#update_002dleap-usage">update-leap usage</a>: update-leap help/usage (<span class="option">--help</span>)
86 1.1 christos <li><a accesskey="2" href="#update_002dleap-source_002durl">update-leap source-url</a>: source-url option (-s)
87 1.1 christos <li><a accesskey="3" href="#update_002dleap-ipv4">update-leap ipv4</a>: ipv4 option (-4)
88 1.1 christos <li><a accesskey="4" href="#update_002dleap-destination">update-leap destination</a>: destination option (-d)
89 1.1 christos <li><a accesskey="5" href="#update_002dleap-expiration">update-leap expiration</a>: expiration option (-e)
90 1.1 christos <li><a accesskey="6" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>: ntp-conf-file option (-f)
91 1.1 christos <li><a accesskey="7" href="#update_002dleap-force_002dupdate">update-leap force-update</a>: force-update option (-F)
92 1.1 christos <li><a accesskey="8" href="#update_002dleap-exit-status">update-leap exit status</a>: exit status
93 1.1 christos <li><a accesskey="9" href="#update_002dleap-Usage">update-leap Usage</a>: Usage
94 1.1 christos <li><a href="#update_002dleap-Authors">update-leap Authors</a>: Authors
95 1.1 christos </ul>
96 1.1 christos
97 1.1 christos <div class="node">
98 1.1 christos <p><hr>
99 1.1.1.5 christos <a name="update_002dleap-usage"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-source_002durl">update-leap source-url</a>,
100 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
101 1.1.1.5 christos <br>
102 1.1 christos </div>
103 1.1 christos
104 1.1.1.5 christos <h4 class="subsection">0.1.1 update-leap help/usage (<span class="option">--help</span>)</h4>
105 1.1 christos
106 1.1 christos <p><a name="index-update_002dleap-help-3"></a>
107 1.1 christos This is the automatically generated usage text for update-leap.
108 1.1 christos
109 1.1 christos <p>The text printed is the same whether selected with the <code>help</code> option
110 1.1.1.5 christos (<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
111 1.1 christos the usage text by passing it through a pager program.
112 1.1 christos <code>more-help</code> is disabled on platforms without a working
113 1.1 christos <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
114 1.1.1.5 christos used to select the program, defaulting to <span class="file">more</span>. Both will exit
115 1.1 christos with a status code of 0.
116 1.1 christos
117 1.1.1.9 christos <pre class="example">
118 1.1 christos </pre>
119 1.1 christos <div class="node">
120 1.1 christos <p><hr>
121 1.1.1.5 christos <a name="update_002dleap-source_002durl"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-ipv4">update-leap ipv4</a>,
122 1.1 christos Previous: <a rel="previous" accesskey="p" href="#update_002dleap-usage">update-leap usage</a>,
123 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
124 1.1.1.5 christos <br>
125 1.1 christos </div>
126 1.1 christos
127 1.1 christos <h4 class="subsection">0.1.2 source-url option (-s)</h4>
128 1.1 christos
129 1.1 christos <p><a name="index-update_002dleap_002dsource_002durl-4"></a>
130 1.1 christos This is the “the url of the master copy of the leapseconds file” option.
131 1.1 christos This option takes a string argument.
132 1.1 christos Specify the URL of the master copy to download
133 1.1 christos $LEAPSRC
134 1.1 christos <div class="node">
135 1.1 christos <p><hr>
136 1.1.1.5 christos <a name="update_002dleap-ipv4"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-destination">update-leap destination</a>,
137 1.1 christos Previous: <a rel="previous" accesskey="p" href="#update_002dleap-source_002durl">update-leap source-url</a>,
138 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
139 1.1.1.5 christos <br>
140 1.1 christos </div>
141 1.1 christos
142 1.1 christos <h4 class="subsection">0.1.3 ipv4 option (-4)</h4>
143 1.1 christos
144 1.1 christos <p><a name="index-update_002dleap_002dipv4-5"></a>
145 1.1 christos This is the “use only ipv4 addresses for dns name resolution” option.
146 1.1 christos
147 1.1 christos <p class="noindent">This option has some usage constraints. It:
148 1.1 christos <ul>
149 1.1 christos <li>must not appear in combination with any of the following options:
150 1.1 christos ipv6.
151 1.1 christos </ul>
152 1.1 christos
153 1.1 christos <p>Force DNS resolution of following host names on the command line
154 1.1 christos to the IPv4 namespace.
155 1.1 christos _EndOfDoc_;
156 1.1 christos ;
157 1.1 christos
158 1.1 christos <p>flag =
159 1.1 christos name = ipv6;
160 1.1 christos flags-cant = ipv4, prefer;
161 1.1 christos value = 6;
162 1.1 christos descrip = "Use only IPv6 addresses for DNS name resolution";
163 1.1 christos doc = <<- _EndOfDoc_
164 1.1 christos Force DNS resolution of following host names on the command line
165 1.1 christos to the IPv6 namespace.
166 1.1 christos _EndOfDoc_;
167 1.1 christos ;
168 1.1 christos
169 1.1 christos <p>flag =
170 1.1 christos name = prefer;
171 1.1 christos flags-cant = ipv4, ipv6;
172 1.1 christos value = p;
173 1.1 christos arg-type = keyword;
174 1.1 christos keyword = 4, 6;
175 1.1 christos descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
176 1.1 christos doc = <<- _EndOfDoc_
177 1.1 christos Prefer IPv4 or IPv6 (as specified) addresses, but use either.
178 1.1 christos <div class="node">
179 1.1 christos <p><hr>
180 1.1.1.5 christos <a name="update_002dleap-destination"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-expiration">update-leap expiration</a>,
181 1.1 christos Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ipv4">update-leap ipv4</a>,
182 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
183 1.1.1.5 christos <br>
184 1.1 christos </div>
185 1.1 christos
186 1.1 christos <h4 class="subsection">0.1.4 destination option (-d)</h4>
187 1.1 christos
188 1.1 christos <p><a name="index-update_002dleap_002ddestination-6"></a>
189 1.1 christos This is the “filename on the local system” option.
190 1.1.1.5 christos This option takes a string argument <span class="file">float</span>.
191 1.1 christos The name to use to store the leapfile on the local system.
192 1.1 christos $LEAPFILE
193 1.1 christos <div class="node">
194 1.1 christos <p><hr>
195 1.1.1.5 christos <a name="update_002dleap-expiration"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
196 1.1 christos Previous: <a rel="previous" accesskey="p" href="#update_002dleap-destination">update-leap destination</a>,
197 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
198 1.1.1.5 christos <br>
199 1.1 christos </div>
200 1.1 christos
201 1.1 christos <h4 class="subsection">0.1.5 expiration option (-e)</h4>
202 1.1 christos
203 1.1 christos <p><a name="index-update_002dleap_002dexpiration-7"></a>
204 1.1 christos This is the “refresh the leapfile this long before it expires” option.
205 1.1 christos This option takes a string argument.
206 1.1 christos Specify how long before expiration the file is to be refreshed
207 1.1 christos Units are required, e.g. "-e 60 days" Note that larger values
208 1.1 christos imply more frequent refreshes.
209 1.1 christos "$PREFETCH"
210 1.1 christos <div class="node">
211 1.1 christos <p><hr>
212 1.1.1.5 christos <a name="update_002dleap-ntp_002dconf_002dfile"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
213 1.1 christos Previous: <a rel="previous" accesskey="p" href="#update_002dleap-expiration">update-leap expiration</a>,
214 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
215 1.1.1.5 christos <br>
216 1.1 christos </div>
217 1.1 christos
218 1.1 christos <h4 class="subsection">0.1.6 ntp-conf-file option (-f)</h4>
219 1.1 christos
220 1.1 christos <p><a name="index-update_002dleap_002dntp_002dconf_002dfile-8"></a>
221 1.1 christos This is the “location of the ntp.conf file” option.
222 1.1 christos This option takes a string argument.
223 1.1 christos Specify location of ntp.conf (used to make sure leapfile directive is
224 1.1 christos present and to default leapfile)
225 1.1 christos /etc/ntp.conf
226 1.1 christos <div class="node">
227 1.1 christos <p><hr>
228 1.1.1.5 christos <a name="update_002dleap-force_002dupdate"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-exit-status">update-leap exit status</a>,
229 1.1 christos Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
230 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
231 1.1.1.5 christos <br>
232 1.1 christos </div>
233 1.1 christos
234 1.1 christos <h4 class="subsection">0.1.7 force-update option (-F)</h4>
235 1.1 christos
236 1.1 christos <p><a name="index-update_002dleap_002dforce_002dupdate-9"></a>
237 1.1 christos This is the “force update of the leapfile” option.
238 1.1 christos Force update even if current file is OK and not close to expiring.
239 1.1 christos <div class="node">
240 1.1 christos <p><hr>
241 1.1.1.5 christos <a name="update_002dleap-exit-status"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Usage">update-leap Usage</a>,
242 1.1 christos Previous: <a rel="previous" accesskey="p" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
243 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
244 1.1.1.5 christos <br>
245 1.1 christos </div>
246 1.1 christos
247 1.1 christos <h4 class="subsection">0.1.8 update-leap exit status</h4>
248 1.1 christos
249 1.1 christos <p>One of the following exit values will be returned:
250 1.1 christos <dl>
251 1.1.1.5 christos <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
252 1.1.1.5 christos <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
253 1.1 christos </dl>
254 1.1 christos <div class="node">
255 1.1 christos <p><hr>
256 1.1.1.5 christos <a name="update_002dleap-Usage"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Authors">update-leap Authors</a>,
257 1.1 christos Previous: <a rel="previous" accesskey="p" href="#update_002dleap-exit-status">update-leap exit status</a>,
258 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
259 1.1.1.5 christos <br>
260 1.1 christos </div>
261 1.1 christos
262 1.1 christos <h4 class="subsection">0.1.9 update-leap Usage</h4>
263 1.1 christos
264 1.1 christos <div class="node">
265 1.1 christos <p><hr>
266 1.1.1.5 christos <a name="update_002dleap-Authors"></a>Previous: <a rel="previous" accesskey="p" href="#update_002dleap-Usage">update-leap Usage</a>,
267 1.1 christos Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
268 1.1.1.5 christos <br>
269 1.1 christos </div>
270 1.1 christos
271 1.1 christos <h4 class="subsection">0.1.10 update-leap Authors</h4>
272 1.1 christos
273 1.1 christos </body></html>
274 1.1 christos
275