1 @node update-leap Invocation
2 @section Invoking update-leap
4 @cindex leap-seconds file manager/updater
7 # EDIT THIS FILE WITH CAUTION (invoke-update-leap.texi)
9 # It has been AutoGen-ed February 20, 2019 at 05:04:22 PM by AutoGen 5.18.5
10 # From the definitions update-leap-opts.def
11 # and the template file agtexi-cmd.tpl
17 will validate the file currently on the local system
18 and if necessary, updates leap-second definition file.
20 Ordinarily, the file is found using the "leapfile" directive in
22 However, an alternate location can be specified on the command line.
24 If the file does not exist, is not valid, has expired, or is expiring soon,
25 a new copy will be downloaded. If the new copy validates, it is installed and
26 NTP is (optionally) restarted.
28 If the current file is acceptable, no download or restart occurs.
30 -c can also be used to invoke another script to perform administrative
31 functions, e.g. to copy the file to other local systems.
33 This can be run as a cron job. As the file is rarely updated, and leap
34 seconds are announced at least one month in advance (usually longer), it
35 need not be run more frequently than about once every three weeks.
37 For cron-friendly behavior, define CRONJOB=1 in the crontab.
39 This script depends on$REQUIREDCMDS
41 This section was generated by @strong{AutoGen},
42 using the @code{agtexi-cmd} template and the option descriptions for the @code{update-leap} program.
45 * update-leap usage:: update-leap help/usage (@option{--help})
46 * update-leap source-url:: source-url option (-s)
47 * update-leap ipv4:: ipv4 option (-4)
48 * update-leap destination:: destination option (-d)
49 * update-leap expiration:: expiration option (-e)
50 * update-leap ntp-conf-file:: ntp-conf-file option (-f)
51 * update-leap force-update:: force-update option (-F)
52 * update-leap exit status:: exit status
53 * update-leap Usage:: Usage
54 * update-leap Authors:: Authors
57 @node update-leap usage
58 @subsection update-leap help/usage (@option{--help})
59 @cindex update-leap help
61 This is the automatically generated usage text for update-leap.
63 The text printed is the same whether selected with the @code{help} option
64 (@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
65 the usage text by passing it through a pager program.
66 @code{more-help} is disabled on platforms without a working
67 @code{fork(2)} function. The @code{PAGER} environment variable is
68 used to select the program, defaulting to @file{more}. Both will exit
69 with a status code of 0.
74 Usage: update-leap [options]
76 Verifies and if necessary, updates leap-second definition file
78 All arguments are optional: Default (or current value) shown:
79 -C Absolute path to CA Cert (see SSL/TLS Considerations)
80 -D Path to a CAdir (see SSL/TLS Considerations)
81 -e Specify how long (in days) before expiration the file is to be
82 refreshed. Note that larger values imply more frequent refreshes.
84 -F Force update even if current file is OK and not close to expiring.
85 -f Absolute path ntp.conf file (default /etc/ntp.conf)
88 -i Specify number of minutes between retries
90 -L Absolute path to leapfile on the local system
91 (overrides value in ntp.conf)
92 -l Specify the syslog(3) facility for logging
94 -q Only report errors (cannot be used with -v)
95 -r Specify number of attempts to retrieve file
97 -s Send output to syslog(3) - implied if STDOUT has no tty or redirected
98 -t Send output to terminal - implied if STDOUT attached to terminal
99 -u Specify the URL of the master copy to download
100 https://www.ietf.org/timezones/data/leap-seconds.list
101 -v Verbose - show debug messages (cannot be used with -q)
103 The following options are not (yet) implemented in the perl version:
106 -c Command to restart NTP after installing a new file
107 <none> - ntpd checks file daily
109 Prefer IPv4 or IPv6 (as specified) addresses, but use either
111 update-leap will validate the file currently on the local system.
113 Ordinarily, the leapfile is found using the 'leapfile' directive in
114 /etc/ntp.conf. However, an alternate location can be specified on the
115 command line with the -L flag.
117 If the leapfile does not exist, is not valid, has expired, or is
118 expiring soon, a new copy will be downloaded. If the new copy is
119 valid, it is installed.
121 If the current file is acceptable, no download or restart occurs.
123 This can be run as a cron job. As the file is rarely updated, and
124 leap seconds are announced at least one month in advance (usually
125 longer), it need not be run more frequently than about once every
128 SSL/TLS Considerations
129 -----------------------
130 The perl modules can usually locate the CA certificate used to verify
133 On BSDs, the default is typically the file /etc/ssl/certs.pem. On
134 Linux, the location is typically a path to a CAdir - a directory of
135 symlinks named according to a hash of the certificates' subject names.
137 The -C or -D options are available to pass in a location if no CA cert
138 is found in the default location.
140 External Dependencies
141 ---------------------
142 The following perl modules are required:
143 HTTP::Tiny - version >= 0.056
144 IO::Socket::SSL - version >= 1.56
145 NET::SSLeay - version >= 1.49
151 @node update-leap source-url
152 @subsection source-url option (-s)
153 @cindex update-leap-source-url
155 This is the ``the url of the master copy of the leapseconds file'' option.
156 This option takes a string argument.
157 Specify the URL of the master copy to download
159 @node update-leap ipv4
160 @subsection ipv4 option (-4)
161 @cindex update-leap-ipv4
163 This is the ``use only ipv4 addresses for dns name resolution'' option.
166 This option has some usage constraints. It:
169 must not appear in combination with any of the following options:
173 Force DNS resolution of following host names on the command line
174 to the IPv4 namespace.
180 flags-cant = ipv4, prefer;
182 descrip = "Use only IPv6 addresses for DNS name resolution";
184 Force DNS resolution of following host names on the command line
185 to the IPv6 namespace.
191 flags-cant = ipv4, ipv6;
195 descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
197 Prefer IPv4 or IPv6 (as specified) addresses, but use either.
198 @node update-leap destination
199 @subsection destination option (-d)
200 @cindex update-leap-destination
202 This is the ``filename on the local system'' option.
203 This option takes a string argument @file{float}.
204 The name to use to store the leapfile on the local system.
206 @node update-leap expiration
207 @subsection expiration option (-e)
208 @cindex update-leap-expiration
210 This is the ``refresh the leapfile this long before it expires'' option.
211 This option takes a string argument.
212 Specify how long before expiration the file is to be refreshed
213 Units are required, e.g. "-e 60 days" Note that larger values
214 imply more frequent refreshes.
216 @node update-leap ntp-conf-file
217 @subsection ntp-conf-file option (-f)
218 @cindex update-leap-ntp-conf-file
220 This is the ``location of the ntp.conf file'' option.
221 This option takes a string argument.
222 Specify location of ntp.conf (used to make sure leapfile directive is
223 present and to default leapfile)
225 @node update-leap force-update
226 @subsection force-update option (-F)
227 @cindex update-leap-force-update
229 This is the ``force update of the leapfile'' option.
230 Force update even if current file is OK and not close to expiring.
231 @node update-leap exit status
232 @subsection update-leap exit status
234 One of the following exit values will be returned:
236 @item 0 (EXIT_SUCCESS)
237 Successful program execution.
238 @item 1 (EXIT_FAILURE)
239 The operation failed or the command syntax was not valid.
241 @node update-leap Usage
242 @subsection update-leap Usage
243 @node update-leap Authors
244 @subsection update-leap Authors