1<html lang="en"> 2<head> 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.8"> 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; } 19 span.sansserif { font-family:sans-serif; font-weight:normal; } 20--></style> 21</head> 22<body> 23<h1 class="settitle">update-leap User's Manual</h1> 24<div class="node"> 25<p><hr> 26<a name="Top"></a> 27Next: <a rel="next" accesskey="n" href="#update_002dleap-Description">update-leap Description</a>, 28Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 29Up: <a rel="up" accesskey="u" href="#dir">(dir)</a> 30 31</div> 32 33 <p>This document describes the use of the NTP Project's <code>update-leap</code> program. 34 35 <p>This document applies to version 4.2.8p5 of <code>update-leap</code>. 36 37<div class="shortcontents"> 38<h2>Short Contents</h2> 39<ul> 40</ul> 41</div> 42 43<ul class="menu"> 44<li><a accesskey="1" href="#update_002dleap-Description">update-leap Description</a>: Description 45<li><a accesskey="2" href="#update_002dleap-Invocation">update-leap Invocation</a>: Invoking update-leap 46</ul> 47 48<div class="node"> 49<p><hr> 50<a name="update-leap-Invocation"></a> 51<a name="update_002dleap-Invocation"></a> 52 53 54</div> 55 56<h3 class="section">0.1 Invoking update-leap</h3> 57 58<p><a name="index-update_002dleap-1"></a><a name="index-leap_002dseconds-file-manager_002fupdater-2"></a> 59 60 <p><code>update-leap</code> 61will validate the file currently on the local system 62and if necessary, updates leap-second definition file. 63 64 <p>Ordinarily, the file is found using the "leapfile" directive in 65<code>ntp.conf(5)</code>. 66However, an alternate location can be specified on the command line. 67 68 <p>If the file does not exist, is not valid, has expired, or is expiring soon, 69a new copy will be downloaded. If the new copy validates, it is installed and 70NTP is (optionally) restarted. 71 72 <p>If the current file is acceptable, no download or restart occurs. 73 74 <p>-c can also be used to invoke another script to perform administrative 75functions, e.g. to copy the file to other local systems. 76.PP 77This can be run as a cron job. As the file is rarely updated, and leap 78seconds are announced at least one month in advance (usually longer), it 79need not be run more frequently than about once every three weeks. 80.PP 81For cron-friendly behavior, define CRONJOB=1 in the crontab. 82.PP 83This script depends on$REQUIREDCMDS 84 85 <p>This section was generated by <strong>AutoGen</strong>, 86using the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program. 87 88<ul class="menu"> 89<li><a accesskey="1" href="#update_002dleap-usage">update-leap usage</a>: update-leap help/usage (<samp><span class="option">--help</span></samp>) 90<li><a accesskey="2" href="#update_002dleap-source_002durl">update-leap source-url</a>: source-url option (-s) 91<li><a accesskey="3" href="#update_002dleap-ipv4">update-leap ipv4</a>: ipv4 option (-4) 92<li><a accesskey="4" href="#update_002dleap-destination">update-leap destination</a>: destination option (-d) 93<li><a accesskey="5" href="#update_002dleap-expiration">update-leap expiration</a>: expiration option (-e) 94<li><a accesskey="6" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>: ntp-conf-file option (-f) 95<li><a accesskey="7" href="#update_002dleap-force_002dupdate">update-leap force-update</a>: force-update option (-F) 96<li><a accesskey="8" href="#update_002dleap-exit-status">update-leap exit status</a>: exit status 97<li><a accesskey="9" href="#update_002dleap-Usage">update-leap Usage</a>: Usage 98<li><a href="#update_002dleap-Authors">update-leap Authors</a>: Authors 99</ul> 100 101<div class="node"> 102<p><hr> 103<a name="update-leap-usage"></a> 104<a name="update_002dleap-usage"></a> 105Next: <a rel="next" accesskey="n" href="#update_002dleap-source_002durl">update-leap source-url</a>, 106Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 107 108</div> 109 110<h4 class="subsection">0.1.1 update-leap help/usage (<samp><span class="option">--help</span></samp>)</h4> 111 112<p><a name="index-update_002dleap-help-3"></a> 113This is the automatically generated usage text for update-leap. 114 115 <p>The text printed is the same whether selected with the <code>help</code> option 116(<samp><span class="option">--help</span></samp>) or the <code>more-help</code> option (<samp><span class="option">--more-help</span></samp>). <code>more-help</code> will print 117the usage text by passing it through a pager program. 118<code>more-help</code> is disabled on platforms without a working 119<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 120used to select the program, defaulting to <samp><span class="file">more</span></samp>. Both will exit 121with a status code of 0. 122 123<pre class="example"> update-leap 124 Usage: $0 [options] [leapfile] 125 126 Verifies and if necessary, updates leap-second definition file 127 128 All arguments are optional: Default (or current value) shown: -s 129 Specify the URL of the master copy to download $LEAPSRC -d Specify 130 the filename on the local system $LEAPFILE -e Specify how long (in 131 days) before expiration the file is to be refreshed. Note that 132 larger values imply more frequent refreshes. "$PREFETCH" -f Specify 133 location of ntp.conf (used to make sure leapfile directive is 134 present and to default leapfile) $NTPCONF -F Force update even if 135 current file is OK and not close to expiring. -r Specify number of 136 times to retry on get failure $MAXTRIES -i Specify number of minutes 137 between retries $INTERVAL -l Use syslog for output (Implied if 138 CRONJOB is set) -L Don't use syslog for output -P Specify the syslog 139 facility for logging $LOGFAC -t Name of temporary file used in 140 validation $TMPFILE -q Only report errors to stdout -v Verbose 141 output 142 143 The following options are not (yet) implemented in the perl version: 144 -4 Use only IPv4 -6 Use only IPv6 -c Command to restart NTP after 145 installing a new file <none> - ntpd checks file daily -p 4|6 Prefer 146 IPv4 or IPv6 (as specified) addresses, but use either -z Specify 147 path for utilities $PATHLIST -Z Only use system path 148 149 $0 will validate the file currently on the local system 150 151 Ordinarily, the file is found using the "leapfile" directive in 152 $NTPCONF. However, an alternate location can be specified on the 153 command line. 154 155 If the file does not exist, is not valid, has expired, or is 156 expiring soon, a new copy will be downloaded. If the new copy 157 validates, it is installed and NTP is (optionally) restarted. 158 159 If the current file is acceptable, no download or restart occurs. 160 161 -c can also be used to invoke another script to perform 162 administrative functions, e.g. to copy the file to other local 163 systems. 164 165 This can be run as a cron job. As the file is rarely updated, and 166 leap seconds are announced at least one month in advance (usually 167 longer), it need not be run more frequently than about once every 168 three weeks. 169 170 For cron-friendly behavior, define CRONJOB=1 in the crontab. 171 172 Version $VERSION 173</pre> 174 <div class="node"> 175<p><hr> 176<a name="update-leap-source-url"></a> 177<a name="update_002dleap-source_002durl"></a> 178Next: <a rel="next" accesskey="n" href="#update_002dleap-ipv4">update-leap ipv4</a>, 179Previous: <a rel="previous" accesskey="p" href="#update_002dleap-usage">update-leap usage</a>, 180Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 181 182</div> 183 184<h4 class="subsection">0.1.2 source-url option (-s)</h4> 185 186<p><a name="index-update_002dleap_002dsource_002durl-4"></a> 187This is the “the url of the master copy of the leapseconds file” option. 188This option takes a string argument. 189Specify the URL of the master copy to download 190$LEAPSRC 191<div class="node"> 192<p><hr> 193<a name="update-leap-ipv4"></a> 194<a name="update_002dleap-ipv4"></a> 195Next: <a rel="next" accesskey="n" href="#update_002dleap-destination">update-leap destination</a>, 196Previous: <a rel="previous" accesskey="p" href="#update_002dleap-source_002durl">update-leap source-url</a>, 197Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 198 199</div> 200 201<h4 class="subsection">0.1.3 ipv4 option (-4)</h4> 202 203<p><a name="index-update_002dleap_002dipv4-5"></a> 204This is the “use only ipv4 addresses for dns name resolution” option. 205 206<p class="noindent">This option has some usage constraints. It: 207 <ul> 208<li>must not appear in combination with any of the following options: 209ipv6. 210</ul> 211 212 <p>Force DNS resolution of following host names on the command line 213 to the IPv4 namespace. 214 _EndOfDoc_; 215; 216 217 <p>flag = 218 name = ipv6; 219 flags-cant = ipv4, prefer; 220 value = 6; 221 descrip = "Use only IPv6 addresses for DNS name resolution"; 222 doc = <<- _EndOfDoc_ 223 Force DNS resolution of following host names on the command line 224 to the IPv6 namespace. 225 _EndOfDoc_; 226; 227 228 <p>flag = 229 name = prefer; 230 flags-cant = ipv4, ipv6; 231 value = p; 232 arg-type = keyword; 233 keyword = 4, 6; 234 descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either'; 235 doc = <<- _EndOfDoc_ 236Prefer IPv4 or IPv6 (as specified) addresses, but use either. 237<div class="node"> 238<p><hr> 239<a name="update-leap-destination"></a> 240<a name="update_002dleap-destination"></a> 241Next: <a rel="next" accesskey="n" href="#update_002dleap-expiration">update-leap expiration</a>, 242Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ipv4">update-leap ipv4</a>, 243Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 244 245</div> 246 247<h4 class="subsection">0.1.4 destination option (-d)</h4> 248 249<p><a name="index-update_002dleap_002ddestination-6"></a> 250This is the “filename on the local system” option. 251This option takes a string argument <samp><span class="file">float</span></samp>. 252The name to use to store the leapfile on the local system. 253$LEAPFILE 254<div class="node"> 255<p><hr> 256<a name="update-leap-expiration"></a> 257<a name="update_002dleap-expiration"></a> 258Next: <a rel="next" accesskey="n" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>, 259Previous: <a rel="previous" accesskey="p" href="#update_002dleap-destination">update-leap destination</a>, 260Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 261 262</div> 263 264<h4 class="subsection">0.1.5 expiration option (-e)</h4> 265 266<p><a name="index-update_002dleap_002dexpiration-7"></a> 267This is the “refresh the leapfile this long before it expires” option. 268This option takes a string argument. 269Specify how long before expiration the file is to be refreshed 270Units are required, e.g. "-e 60 days" Note that larger values 271imply more frequent refreshes. 272"$PREFETCH" 273<div class="node"> 274<p><hr> 275<a name="update-leap-ntp-conf-file"></a> 276<a name="update_002dleap-ntp_002dconf_002dfile"></a> 277Next: <a rel="next" accesskey="n" href="#update_002dleap-force_002dupdate">update-leap force-update</a>, 278Previous: <a rel="previous" accesskey="p" href="#update_002dleap-expiration">update-leap expiration</a>, 279Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 280 281</div> 282 283<h4 class="subsection">0.1.6 ntp-conf-file option (-f)</h4> 284 285<p><a name="index-update_002dleap_002dntp_002dconf_002dfile-8"></a> 286This is the “location of the ntp.conf file” option. 287This option takes a string argument. 288Specify location of ntp.conf (used to make sure leapfile directive is 289present and to default leapfile) 290/etc/ntp.conf 291<div class="node"> 292<p><hr> 293<a name="update-leap-force-update"></a> 294<a name="update_002dleap-force_002dupdate"></a> 295Next: <a rel="next" accesskey="n" href="#update_002dleap-exit-status">update-leap exit status</a>, 296Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>, 297Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 298 299</div> 300 301<h4 class="subsection">0.1.7 force-update option (-F)</h4> 302 303<p><a name="index-update_002dleap_002dforce_002dupdate-9"></a> 304This is the “force update of the leapfile” option. 305Force update even if current file is OK and not close to expiring. 306<div class="node"> 307<p><hr> 308<a name="update-leap-exit-status"></a> 309<a name="update_002dleap-exit-status"></a> 310Next: <a rel="next" accesskey="n" href="#update_002dleap-Usage">update-leap Usage</a>, 311Previous: <a rel="previous" accesskey="p" href="#update_002dleap-force_002dupdate">update-leap force-update</a>, 312Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 313 314</div> 315 316<h4 class="subsection">0.1.8 update-leap exit status</h4> 317 318<p>One of the following exit values will be returned: 319 <dl> 320<dt>`<samp><span class="samp">0 (EXIT_SUCCESS)</span></samp>'<dd>Successful program execution. 321<br><dt>`<samp><span class="samp">1 (EXIT_FAILURE)</span></samp>'<dd>The operation failed or the command syntax was not valid. 322</dl> 323 <div class="node"> 324<p><hr> 325<a name="update-leap-Usage"></a> 326<a name="update_002dleap-Usage"></a> 327Next: <a rel="next" accesskey="n" href="#update_002dleap-Authors">update-leap Authors</a>, 328Previous: <a rel="previous" accesskey="p" href="#update_002dleap-exit-status">update-leap exit status</a>, 329Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 330 331</div> 332 333<h4 class="subsection">0.1.9 update-leap Usage</h4> 334 335<div class="node"> 336<p><hr> 337<a name="update-leap-Authors"></a> 338<a name="update_002dleap-Authors"></a> 339Previous: <a rel="previous" accesskey="p" href="#update_002dleap-Usage">update-leap Usage</a>, 340Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a> 341 342</div> 343 344<h4 class="subsection">0.1.10 update-leap Authors</h4> 345 346</body></html> 347 348