1281348Scy<html lang="en">
2281348Scy<head>
3281348Scy<title>update-leap User's Manual</title>
4281348Scy<meta http-equiv="Content-Type" content="text/html">
5281348Scy<meta name="description" content="update-leap User's Manual">
6281348Scy<meta name="generator" content="makeinfo 4.7">
7281348Scy<link title="Top" rel="top" href="#Top">
8281348Scy<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9281348Scy<meta http-equiv="Content-Style-Type" content="text/css">
10281348Scy<style type="text/css"><!--
11281348Scy  pre.display { font-family:inherit }
12281348Scy  pre.format  { font-family:inherit }
13281348Scy  pre.smalldisplay { font-family:inherit; font-size:smaller }
14281348Scy  pre.smallformat  { font-family:inherit; font-size:smaller }
15281348Scy  pre.smallexample { font-size:smaller }
16281348Scy  pre.smalllisp    { font-size:smaller }
17281348Scy  span.sc { font-variant:small-caps }
18281348Scy  span.roman { font-family: serif; font-weight: normal; } 
19281348Scy--></style>
20281348Scy</head>
21281348Scy<body>
22281348Scy<h1 class="settitle">update-leap User's Manual</h1>
23281348Scy<div class="node">
24281348Scy<p><hr>
25281348Scy<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Description">update-leap Description</a>,
26281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
28281348Scy<br>
29281348Scy</div>
30281348Scy
31281348Scy  <p>This document describes the use of the NTP Project's <code>update-leap</code> program.
32281348Scy
33330567Sgordon  <p>This document applies to version 4.2.8p11 of <code>update-leap</code>.
34281348Scy
35281348Scy<div class="shortcontents">
36281348Scy<h2>Short Contents</h2>
37281348Scy<ul>
38281348Scy</ul>
39281348Scy</div>
40281348Scy
41281348Scy<ul class="menu">
42281348Scy<li><a accesskey="1" href="#update_002dleap-Description">update-leap Description</a>:             Description
43281348Scy<li><a accesskey="2" href="#update_002dleap-Invocation">update-leap Invocation</a>: 		Invoking update-leap
44281348Scy</ul>
45281348Scy
46281348Scy<div class="node">
47281348Scy<p><hr>
48281348Scy<a name="update_002dleap-Invocation"></a>
49281348Scy<br>
50281348Scy</div>
51281348Scy
52281348Scy<h3 class="section">0.1 Invoking update-leap</h3>
53281348Scy
54281348Scy<p><a name="index-update_002dleap-1"></a><a name="index-leap_002dseconds-file-manager_002fupdater-2"></a>
55281348Scy
56281348Scy  <p><code>update-leap</code>
57281348Scywill validate the file currently on the local system
58281348Scyand if necessary, updates leap-second definition file.
59281348Scy
60281348Scy  <p>Ordinarily, the file is found using the "leapfile" directive in
61281348Scy<code>ntp.conf(5)</code>. 
62281348ScyHowever, an alternate location can be specified on the command line.
63281348Scy
64281348Scy  <p>If the file does not exist, is not valid, has expired, or is expiring soon,
65281348Scya new copy will be downloaded.  If the new copy validates, it is installed and
66281348ScyNTP is (optionally) restarted.
67281348Scy
68281348Scy  <p>If the current file is acceptable, no download or restart occurs.
69281348Scy
70281348Scy  <p>-c can also be used to invoke another script to perform administrative
71281348Scyfunctions, e.g. to copy the file to other local systems. 
72281348Scy.PP
73281348ScyThis can be run as a cron job.  As the file is rarely updated, and leap
74281348Scyseconds are announced at least one month in advance (usually longer), it
75281348Scyneed not be run more frequently than about once every three weeks. 
76281348Scy.PP
77281348ScyFor cron-friendly behavior, define CRONJOB=1 in the crontab. 
78281348Scy.PP
79281348ScyThis script depends on$REQUIREDCMDS
80281348Scy
81281348Scy  <p>This section was generated by <strong>AutoGen</strong>,
82281348Scyusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program.
83281348Scy
84281348Scy<ul class="menu">
85281348Scy<li><a accesskey="1" href="#update_002dleap-usage">update-leap usage</a>:                   update-leap help/usage (<span class="option">--help</span>)
86281348Scy<li><a accesskey="2" href="#update_002dleap-source_002durl">update-leap source-url</a>:              source-url option (-s)
87281348Scy<li><a accesskey="3" href="#update_002dleap-ipv4">update-leap ipv4</a>:                    ipv4 option (-4)
88281348Scy<li><a accesskey="4" href="#update_002dleap-destination">update-leap destination</a>:             destination option (-d)
89281348Scy<li><a accesskey="5" href="#update_002dleap-expiration">update-leap expiration</a>:              expiration option (-e)
90281348Scy<li><a accesskey="6" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>:           ntp-conf-file option (-f)
91281348Scy<li><a accesskey="7" href="#update_002dleap-force_002dupdate">update-leap force-update</a>:            force-update option (-F)
92281348Scy<li><a accesskey="8" href="#update_002dleap-exit-status">update-leap exit status</a>:             exit status
93281348Scy<li><a accesskey="9" href="#update_002dleap-Usage">update-leap Usage</a>:                   Usage
94281348Scy<li><a href="#update_002dleap-Authors">update-leap Authors</a>:                 Authors
95281348Scy</ul>
96281348Scy
97281348Scy<div class="node">
98281348Scy<p><hr>
99281348Scy<a name="update_002dleap-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-source_002durl">update-leap source-url</a>,
100281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
101281348Scy<br>
102281348Scy</div>
103281348Scy
104281348Scy<h4 class="subsection">0.1.1 update-leap help/usage (<span class="option">--help</span>)</h4>
105281348Scy
106281348Scy<p><a name="index-update_002dleap-help-3"></a>
107281348ScyThis is the automatically generated usage text for update-leap.
108281348Scy
109281348Scy  <p>The text printed is the same whether selected with the <code>help</code> option
110281348Scy(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>).  <code>more-help</code> will print
111281348Scythe usage text by passing it through a pager program. 
112281348Scy<code>more-help</code> is disabled on platforms without a working
113281348Scy<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
114281348Scyused to select the program, defaulting to <span class="file">more</span>.  Both will exit
115281348Scywith a status code of 0.
116281348Scy
117330567Sgordon<pre class="example">
118281348Scy</pre>
119281348Scy  <div class="node">
120281348Scy<p><hr>
121281348Scy<a name="update_002dleap-source_002durl"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-ipv4">update-leap ipv4</a>,
122281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-usage">update-leap usage</a>,
123281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
124281348Scy<br>
125281348Scy</div>
126281348Scy
127281348Scy<h4 class="subsection">0.1.2 source-url option (-s)</h4>
128281348Scy
129281348Scy<p><a name="index-update_002dleap_002dsource_002durl-4"></a>
130281348ScyThis is the &ldquo;the url of the master copy of the leapseconds file&rdquo; option. 
131281348ScyThis option takes a string argument. 
132281348ScySpecify the URL of the master copy to download
133281348Scy$LEAPSRC
134281348Scy<div class="node">
135281348Scy<p><hr>
136281348Scy<a name="update_002dleap-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-destination">update-leap destination</a>,
137281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-source_002durl">update-leap source-url</a>,
138281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
139281348Scy<br>
140281348Scy</div>
141281348Scy
142281348Scy<h4 class="subsection">0.1.3 ipv4 option (-4)</h4>
143281348Scy
144281348Scy<p><a name="index-update_002dleap_002dipv4-5"></a>
145281348ScyThis is the &ldquo;use only ipv4 addresses for dns name resolution&rdquo; option.
146281348Scy
147281348Scy<p class="noindent">This option has some usage constraints.  It:
148281348Scy     <ul>
149281348Scy<li>must not appear in combination with any of the following options:
150281348Scyipv6. 
151281348Scy</ul>
152281348Scy
153281348Scy  <p>Force DNS resolution of following host names on the command line
154281348Scy        to the IPv4 namespace. 
155281348Scy        _EndOfDoc_;
156281348Scy;
157281348Scy
158281348Scy  <p>flag = 
159281348Scy    name      = ipv6;
160281348Scy    flags-cant = ipv4, prefer;
161281348Scy    value     = 6;
162281348Scy    descrip   = "Use only IPv6 addresses for DNS name resolution";
163281348Scy    doc = &lt;&lt;-  _EndOfDoc_
164281348Scy        Force DNS resolution of following host names on the command line
165281348Scy        to the IPv6 namespace. 
166281348Scy        _EndOfDoc_;
167281348Scy;
168281348Scy
169281348Scy  <p>flag = 
170281348Scy    name        = prefer;
171281348Scy    flags-cant	= ipv4, ipv6;
172281348Scy    value	= p;
173281348Scy    arg-type    = keyword;
174281348Scy    keyword	= 4, 6;
175281348Scy    descrip     = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
176281348Scy    doc         = &lt;&lt;-  _EndOfDoc_
177281348ScyPrefer IPv4 or IPv6 (as specified) addresses, but use either. 
178281348Scy<div class="node">
179281348Scy<p><hr>
180281348Scy<a name="update_002dleap-destination"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-expiration">update-leap expiration</a>,
181281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-ipv4">update-leap ipv4</a>,
182281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
183281348Scy<br>
184281348Scy</div>
185281348Scy
186281348Scy<h4 class="subsection">0.1.4 destination option (-d)</h4>
187281348Scy
188281348Scy<p><a name="index-update_002dleap_002ddestination-6"></a>
189281348ScyThis is the &ldquo;filename on the local system&rdquo; option. 
190281348ScyThis option takes a string argument <span class="file">float</span>. 
191281348ScyThe name to use to store the leapfile on the local system. 
192281348Scy$LEAPFILE
193281348Scy<div class="node">
194281348Scy<p><hr>
195281348Scy<a name="update_002dleap-expiration"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
196281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-destination">update-leap destination</a>,
197281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
198281348Scy<br>
199281348Scy</div>
200281348Scy
201281348Scy<h4 class="subsection">0.1.5 expiration option (-e)</h4>
202281348Scy
203281348Scy<p><a name="index-update_002dleap_002dexpiration-7"></a>
204281348ScyThis is the &ldquo;refresh the leapfile this long before it expires&rdquo; option. 
205281348ScyThis option takes a string argument. 
206281348ScySpecify how long before expiration the file is to be refreshed
207281348ScyUnits are required, e.g. "-e 60 days"  Note that larger values
208281348Scyimply more frequent refreshes. 
209281348Scy"$PREFETCH"
210281348Scy<div class="node">
211281348Scy<p><hr>
212281348Scy<a name="update_002dleap-ntp_002dconf_002dfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
213281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-expiration">update-leap expiration</a>,
214281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
215281348Scy<br>
216281348Scy</div>
217281348Scy
218281348Scy<h4 class="subsection">0.1.6 ntp-conf-file option (-f)</h4>
219281348Scy
220281348Scy<p><a name="index-update_002dleap_002dntp_002dconf_002dfile-8"></a>
221281348ScyThis is the &ldquo;location of the ntp.conf file&rdquo; option. 
222281348ScyThis option takes a string argument. 
223281348ScySpecify location of ntp.conf (used to make sure leapfile directive is
224281348Scypresent and to default  leapfile)
225281348Scy/etc/ntp.conf
226281348Scy<div class="node">
227281348Scy<p><hr>
228281348Scy<a name="update_002dleap-force_002dupdate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-exit-status">update-leap exit status</a>,
229281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
230281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
231281348Scy<br>
232281348Scy</div>
233281348Scy
234281348Scy<h4 class="subsection">0.1.7 force-update option (-F)</h4>
235281348Scy
236281348Scy<p><a name="index-update_002dleap_002dforce_002dupdate-9"></a>
237281348ScyThis is the &ldquo;force update of the leapfile&rdquo; option. 
238281348ScyForce update even if current file is OK and not close to expiring. 
239281348Scy<div class="node">
240281348Scy<p><hr>
241281348Scy<a name="update_002dleap-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Usage">update-leap Usage</a>,
242281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
243281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
244281348Scy<br>
245281348Scy</div>
246281348Scy
247281348Scy<h4 class="subsection">0.1.8 update-leap exit status</h4>
248281348Scy
249281348Scy<p>One of the following exit values will be returned:
250281348Scy     <dl>
251281348Scy<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 
252281348Scy<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 
253281348Scy</dl>
254281348Scy  <div class="node">
255281348Scy<p><hr>
256281348Scy<a name="update_002dleap-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#update_002dleap-Authors">update-leap Authors</a>,
257281348ScyPrevious:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-exit-status">update-leap exit status</a>,
258281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
259281348Scy<br>
260281348Scy</div>
261281348Scy
262281348Scy<h4 class="subsection">0.1.9 update-leap Usage</h4>
263281348Scy
264281348Scy<div class="node">
265281348Scy<p><hr>
266281348Scy<a name="update_002dleap-Authors"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#update_002dleap-Usage">update-leap Usage</a>,
267281348ScyUp:&nbsp;<a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
268281348Scy<br>
269281348Scy</div>
270281348Scy
271281348Scy<h4 class="subsection">0.1.10 update-leap Authors</h4>
272281348Scy
273281348Scy</body></html>
274281348Scy
275