update-leap.mdoc.in revision 301301
1267843Sdelphij.Dd June 2 2016
2267843Sdelphij.Dt UPDATE_LEAP 1update-leapmdoc User Commands
3267843Sdelphij.Os
4267843Sdelphij.\"  EDIT THIS FILE WITH CAUTION  (update-leap-opts.mdoc)
5267843Sdelphij.\"
6267843Sdelphij.\"  It has been AutoGen-ed  June  2, 2016 at 07:25:37 AM by AutoGen 5.18.5
7267843Sdelphij.\"  From the definitions    update-leap-opts.def
8267843Sdelphij.\"  and the template file   agmdoc-cmd.tpl
9267843Sdelphij.Sh NAME
10267843Sdelphij.Nm update-leap
11267843Sdelphij.Nd leap-seconds file manager/updater
12267843Sdelphij.Sh SYNOPSIS
13267843Sdelphij.Nm
14267843Sdelphij.\" Mixture of short (flag) options and long options
15267843Sdelphij.Op Fl flags
16267843Sdelphij.Op Fl flag Op Ar value
17267843Sdelphij.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
18267843Sdelphij.Pp
19267843SdelphijAll arguments must be options.
20267843Sdelphij.Pp
21267843Sdelphij.Sh DESCRIPTION
22267843Sdelphij.Nm
23267843Sdelphijwill validate the file currently on the local system
24267843Sdelphijand if necessary, updates leap\-second definition file.
25267843Sdelphij.Pp
26267843SdelphijOrdinarily, the file is found using the "leapfile" directive in
27267843Sdelphij.Xr ntp.conf 5 .
28267843SdelphijHowever, an alternate location can be specified on the command line.
29267843Sdelphij.Pp
30267843SdelphijIf the file does not exist, is not valid, has expired, or is expiring soon,
31267843Sdelphija new copy will be downloaded.  If the new copy validates, it is installed and
32267843SdelphijNTP is (optionally) restarted.
33267843Sdelphij.Pp
34267843SdelphijIf the current file is acceptable, no download or restart occurs.
35267843Sdelphij.Pp
36267843Sdelphij-c can also be used to invoke another script to perform administrative
37267843Sdelphijfunctions, e.g. to copy the file to other local systems.
38267843Sdelphij.PP
39267843SdelphijThis can be run as a cron job.  As the file is rarely updated, and leap
40267843Sdelphijseconds are announced at least one month in advance (usually longer), it
41267843Sdelphijneed not be run more frequently than about once every three weeks.
42267843Sdelphij.PP
43For cron\-friendly behavior, define CRONJOB=1 in the crontab.
44.PP
45This script depends on$REQUIREDCMDS
46.Sh "OPTIONS"
47.Bl -tag
48.It  Fl s Ar string , Fl \-source\-url Ns = Ns Ar string 
49The URL of the master copy of the leapseconds file.
50.sp
51Specify the URL of the master copy to download
52$LEAPSRC
53.It  Fl 4 , Fl \-ipv4 
54Use only IPv4 addresses for DNS name resolution.
55This option must not appear in combination with any of the following options:
56ipv6.
57.sp
58        Force DNS resolution of following host names on the command line
59        to the IPv4 namespace.
60        _EndOfDoc_;
61};
62.sp
63flag = {
64    name      = ipv6;
65    flags\-cant = ipv4, prefer;
66    value     = 6;
67    descrip   = "Use only IPv6 addresses for DNS name resolution";
68    doc = <<\-  _EndOfDoc_
69        Force DNS resolution of following host names on the command line
70        to the IPv6 namespace.
71        _EndOfDoc_;
72};
73.sp
74flag = {
75    name        = prefer;
76    flags\-cant	= ipv4, ipv6;
77    value	= p;
78    arg\-type    = keyword;
79    keyword	= 4, 6;
80    descrip     = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
81    doc         = <<\-  _EndOfDoc_
82Prefer IPv4 or IPv6 (as specified) addresses, but use either.
83.It  Fl d Ar float , Fl \-destination Ns = Ns Ar float 
84Filename on the local system.
85.sp
86The name to use to store the leapfile on the local system.
87$LEAPFILE
88.It  Fl e Ar string , Fl \-expiration Ns = Ns Ar string 
89Refresh the leapfile this long before it expires.
90.sp
91Specify how long before expiration the file is to be refreshed
92Units are required, e.g. "\-e 60 days"  Note that larger values
93imply more frequent refreshes.
94"$PREFETCH"
95.It  Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string 
96Location of the ntp.conf file.
97.sp
98Specify location of ntp.conf (used to make sure leapfile directive is
99present and to default  leapfile)
100/etc/ntp.conf
101.It  Fl F , Fl \-force\-update 
102Force update of the leapfile.
103.sp
104Force update even if current file is OK and not close to expiring.
105.It  Fl \-dont\-wait 
106Don't wait for keystroke between plots.
107.sp
108.It Fl \&? , Fl \-help
109Display usage information and exit.
110.It Fl \&! , Fl \-more\-help
111Pass the extended usage information through a pager.
112.It Fl v Op Brq Ar v|c|n  Fl \-version Op Brq Ar v|c|n
113Output version of program and exit.  The default mode is `v', a simple
114version.  The `c' mode will print copyright information and `n' will
115print the full copyright notice.
116.El
117.Sh USAGE
118Usage stuff
119.Sh "EXIT STATUS"
120One of the following exit values will be returned:
121.Bl -tag
122.It 0 " (EXIT_SUCCESS)"
123Successful program execution.
124.It 1 " (EXIT_FAILURE)"
125The operation failed or the command syntax was not valid.
126.It 70 " (EX_SOFTWARE)"
127libopts had an internal operational error.  Please report
128it to autogen\-users@lists.sourceforge.net.  Thank you.
129.El
130.Sh AUTHORS
131.An "Timothe Litt"
132.Sh "NOTES"
133This manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP
134option definitions.
135