3 <title>update-leap User's Manual</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="update-leap User's Manual">
6 <meta name="generator" content="makeinfo 4.7">
7 <link title="Top" rel="top" href="#Top">
8 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 <meta http-equiv="Content-Style-Type" content="text/css">
10 <style type="text/css"><!--
11 pre.display { font-family:inherit }
12 pre.format { font-family:inherit }
13 pre.smalldisplay { font-family:inherit; font-size:smaller }
14 pre.smallformat { font-family:inherit; font-size:smaller }
15 pre.smallexample { font-size:smaller }
16 pre.smalllisp { font-size:smaller }
17 span.sc { font-variant:small-caps }
18 span.roman { font-family: serif; font-weight: normal; }
22 <h1 class="settitle">update-leap User's Manual</h1>
25 <a name="Top"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Description">update-leap Description</a>,
26 Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27 Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
31 <p>This document describes the use of the NTP Project's <code>update-leap</code> program.
33 <p>This document applies to version 4.2.8p2 of <code>update-leap</code>.
35 <div class="shortcontents">
36 <h2>Short Contents</h2>
42 <li><a accesskey="1" href="#update_002dleap-Description">update-leap Description</a>: Description
43 <li><a accesskey="2" href="#update_002dleap-Invocation">update-leap Invocation</a>: Invoking update-leap
48 <a name="update_002dleap-Invocation"></a>
52 <h3 class="section">0.1 Invoking update-leap</h3>
54 <p><a name="index-update_002dleap-1"></a><a name="index-leap_002dseconds-file-manager_002fupdater-2"></a>
56 <p><code>update-leap</code>
57 will validate the file currently on the local system
58 and if necessary, updates leap-second definition file.
60 <p>Ordinarily, the file is found using the "leapfile" directive in
61 <code>ntp.conf(5)</code>.
62 However, an alternate location can be specified on the command line.
64 <p>If the file does not exist, is not valid, has expired, or is expiring soon,
65 a new copy will be downloaded. If the new copy validates, it is installed and
66 NTP is (optionally) restarted.
68 <p>If the current file is acceptable, no download or restart occurs.
70 <p>-c can also be used to invoke another script to perform administrative
71 functions, e.g. to copy the file to other local systems.
73 This can be run as a cron job. As the file is rarely updated, and leap
74 seconds are announced at least one month in advance (usually longer), it
75 need not be run more frequently than about once every three weeks.
77 For cron-friendly behavior, define CRONJOB=1 in the crontab.
79 This script depends on$REQUIREDCMDS
81 <p>This section was generated by <strong>AutoGen</strong>,
82 using the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program.
85 <li><a accesskey="1" href="#update_002dleap-usage">update-leap usage</a>: update-leap help/usage (<span class="option">--help</span>)
86 <li><a accesskey="2" href="#update_002dleap-source_002durl">update-leap source-url</a>: source-url option (-s)
87 <li><a accesskey="3" href="#update_002dleap-ipv4">update-leap ipv4</a>: ipv4 option (-4)
88 <li><a accesskey="4" href="#update_002dleap-destination">update-leap destination</a>: destination option (-d)
89 <li><a accesskey="5" href="#update_002dleap-expiration">update-leap expiration</a>: expiration option (-e)
90 <li><a accesskey="6" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>: ntp-conf-file option (-f)
91 <li><a accesskey="7" href="#update_002dleap-force_002dupdate">update-leap force-update</a>: force-update option (-F)
92 <li><a accesskey="8" href="#update_002dleap-exit-status">update-leap exit status</a>: exit status
93 <li><a accesskey="9" href="#update_002dleap-Usage">update-leap Usage</a>: Usage
94 <li><a href="#update_002dleap-Authors">update-leap Authors</a>: Authors
99 <a name="update_002dleap-usage"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-source_002durl">update-leap source-url</a>,
100 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
104 <h4 class="subsection">0.1.1 update-leap help/usage (<span class="option">--help</span>)</h4>
106 <p><a name="index-update_002dleap-help-3"></a>
107 This is the automatically generated usage text for update-leap.
109 <p>The text printed is the same whether selected with the <code>help</code> option
110 (<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 the usage text by passing it through a pager program.
112 <code>more-help</code> is disabled on platforms without a working
113 <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
114 used to select the program, defaulting to <span class="file">more</span>. Both will exit
115 with a status code of 0.
117 <pre class="example">/bin/bash: line 136: ./update-leap: Permission denied
121 <a name="update_002dleap-source_002durl"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-ipv4">update-leap ipv4</a>,
122 Previous: <a rel="previous" accesskey="p" href="#update_002dleap-usage">update-leap usage</a>,
123 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
127 <h4 class="subsection">0.1.2 source-url option (-s)</h4>
129 <p><a name="index-update_002dleap_002dsource_002durl-4"></a>
130 This is the “the url of the master copy of the leapseconds file” option.
131 This option takes a string argument.
132 Specify the URL of the master copy to download
136 <a name="update_002dleap-ipv4"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-destination">update-leap destination</a>,
137 Previous: <a rel="previous" accesskey="p" href="#update_002dleap-source_002durl">update-leap source-url</a>,
138 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
142 <h4 class="subsection">0.1.3 ipv4 option (-4)</h4>
144 <p><a name="index-update_002dleap_002dipv4-5"></a>
145 This is the “use only ipv4 addresses for dns name resolution” option.
147 <p class="noindent">This option has some usage constraints. It:
149 <li>must not appear in combination with any of the following options:
153 <p>Force DNS resolution of following host names on the command line
154 to the IPv4 namespace.
160 flags-cant = ipv4, prefer;
162 descrip = "Use only IPv6 addresses for DNS name resolution";
163 doc = <<- _EndOfDoc_
164 Force DNS resolution of following host names on the command line
165 to the IPv6 namespace.
171 flags-cant = ipv4, ipv6;
175 descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
176 doc = <<- _EndOfDoc_
177 Prefer IPv4 or IPv6 (as specified) addresses, but use either.
180 <a name="update_002dleap-destination"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-expiration">update-leap expiration</a>,
181 Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ipv4">update-leap ipv4</a>,
182 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
186 <h4 class="subsection">0.1.4 destination option (-d)</h4>
188 <p><a name="index-update_002dleap_002ddestination-6"></a>
189 This is the “filename on the local system” option.
190 This option takes a string argument <span class="file">float</span>.
191 The name to use to store the leapfile on the local system.
195 <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 Previous: <a rel="previous" accesskey="p" href="#update_002dleap-destination">update-leap destination</a>,
197 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
201 <h4 class="subsection">0.1.5 expiration option (-e)</h4>
203 <p><a name="index-update_002dleap_002dexpiration-7"></a>
204 This is the “refresh the leapfile this long before it expires” option.
205 This option takes a string argument.
206 Specify how long before expiration the file is to be refreshed
207 Units are required, e.g. "-e 60 days" Note that larger values
208 imply more frequent refreshes.
212 <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 Previous: <a rel="previous" accesskey="p" href="#update_002dleap-expiration">update-leap expiration</a>,
214 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
218 <h4 class="subsection">0.1.6 ntp-conf-file option (-f)</h4>
220 <p><a name="index-update_002dleap_002dntp_002dconf_002dfile-8"></a>
221 This is the “location of the ntp.conf file” option.
222 This option takes a string argument.
223 Specify location of ntp.conf (used to make sure leapfile directive is
224 present and to default leapfile)
228 <a name="update_002dleap-force_002dupdate"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-exit-status">update-leap exit status</a>,
229 Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
230 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
234 <h4 class="subsection">0.1.7 force-update option (-F)</h4>
236 <p><a name="index-update_002dleap_002dforce_002dupdate-9"></a>
237 This is the “force update of the leapfile” option.
238 Force update even if current file is OK and not close to expiring.
241 <a name="update_002dleap-exit-status"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Usage">update-leap Usage</a>,
242 Previous: <a rel="previous" accesskey="p" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
243 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
247 <h4 class="subsection">0.1.8 update-leap exit status</h4>
249 <p>One of the following exit values will be returned:
251 <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
252 <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
256 <a name="update_002dleap-Usage"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Authors">update-leap Authors</a>,
257 Previous: <a rel="previous" accesskey="p" href="#update_002dleap-exit-status">update-leap exit status</a>,
258 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
262 <h4 class="subsection">0.1.9 update-leap Usage</h4>
266 <a name="update_002dleap-Authors"></a>Previous: <a rel="previous" accesskey="p" href="#update_002dleap-Usage">update-leap Usage</a>,
267 Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
271 <h4 class="subsection">0.1.10 update-leap Authors</h4>