update-leap.mdoc.in revision 344884
1230557Sjimharris.Dd February 20 2019
2230557Sjimharris.Dt UPDATE_LEAP 1update-leapmdoc User Commands
3230557Sjimharris.Os
4230557Sjimharris.\"  EDIT THIS FILE WITH CAUTION  (update-leap-opts.mdoc)
5230557Sjimharris.\"
6230557Sjimharris.\"  It has been AutoGen-ed  February 20, 2019 at 09:57:38 AM by AutoGen 5.18.5
7230557Sjimharris.\"  From the definitions    update-leap-opts.def
8230557Sjimharris.\"  and the template file   agmdoc-cmd.tpl
9230557Sjimharris.Sh NAME
10230557Sjimharris.Nm update-leap
11230557Sjimharris.Nd leap-seconds file manager/updater
12230557Sjimharris.Sh SYNOPSIS
13230557Sjimharris.Nm
14230557Sjimharris.\" Mixture of short (flag) options and long options
15230557Sjimharris.Op Fl flags
16230557Sjimharris.Op Fl flag Op Ar value
17230557Sjimharris.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
18230557Sjimharris.Pp
19230557SjimharrisAll arguments must be options.
20230557Sjimharris.Pp
21230557Sjimharris.Sh DESCRIPTION
22230557Sjimharris.Nm
23230557Sjimharriswill validate the file currently on the local system
24230557Sjimharrisand if necessary, updates leap\-second definition file.
25230557Sjimharris.Pp
26230557SjimharrisOrdinarily, the file is found using the "leapfile" directive in
27230557Sjimharris.Xr ntp.conf 5 .
28230557SjimharrisHowever, an alternate location can be specified on the command line.
29230557Sjimharris.Pp
30230557SjimharrisIf the file does not exist, is not valid, has expired, or is expiring soon,
31230557Sjimharrisa new copy will be downloaded.  If the new copy validates, it is installed and
32230557SjimharrisNTP is (optionally) restarted.
33230557Sjimharris.Pp
34230557SjimharrisIf the current file is acceptable, no download or restart occurs.
35230557Sjimharris.Pp
36230557Sjimharris-c can also be used to invoke another script to perform administrative
37230557Sjimharrisfunctions, e.g. to copy the file to other local systems.
38230557Sjimharris.PP
39230557SjimharrisThis can be run as a cron job.  As the file is rarely updated, and leap
40230557Sjimharrisseconds are announced at least one month in advance (usually longer), it
41230557Sjimharrisneed not be run more frequently than about once every three weeks.
42230557Sjimharris.PP
43230557SjimharrisFor cron\-friendly behavior, define CRONJOB=1 in the crontab.
44230557Sjimharris.PP
45230557SjimharrisThis script depends on$REQUIREDCMDS
46230557Sjimharris.Sh "OPTIONS"
47230557Sjimharris.Bl -tag
48230557Sjimharris.It  Fl s Ar string , Fl \-source\-url Ns = Ns Ar string 
49230557SjimharrisThe URL of the master copy of the leapseconds file.
50230557Sjimharris.sp
51230557SjimharrisSpecify the URL of the master copy to download
52230557Sjimharris$LEAPSRC
53230557Sjimharris.It  Fl 4 , Fl \-ipv4 
54230557SjimharrisUse only IPv4 addresses for DNS name resolution.
55230557SjimharrisThis option must not appear in combination with any of the following options:
56230557Sjimharrisipv6.
57230557Sjimharris.sp
58230557Sjimharris        Force DNS resolution of following host names on the command line
59230557Sjimharris        to the IPv4 namespace.
60230557Sjimharris        _EndOfDoc_;
61230557Sjimharris};
62230557Sjimharris.sp
63230557Sjimharrisflag = {
64230557Sjimharris    name      = ipv6;
65230557Sjimharris    flags\-cant = ipv4, prefer;
66230557Sjimharris    value     = 6;
67230557Sjimharris    descrip   = "Use only IPv6 addresses for DNS name resolution";
68230557Sjimharris    doc = <<\-  _EndOfDoc_
69230557Sjimharris        Force DNS resolution of following host names on the command line
70230557Sjimharris        to the IPv6 namespace.
71230557Sjimharris        _EndOfDoc_;
72230557Sjimharris};
73230557Sjimharris.sp
74230557Sjimharrisflag = {
75230557Sjimharris    name        = prefer;
76230557Sjimharris    flags\-cant	= ipv4, ipv6;
77230557Sjimharris    value	= p;
78230557Sjimharris    arg\-type    = keyword;
79230557Sjimharris    keyword	= 4, 6;
80230557Sjimharris    descrip     = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
81230557Sjimharris    doc         = <<\-  _EndOfDoc_
82230557SjimharrisPrefer IPv4 or IPv6 (as specified) addresses, but use either.
83230557Sjimharris.It  Fl d Ar float , Fl \-destination Ns = Ns Ar float 
84230557SjimharrisFilename on the local system.
85230557Sjimharris.sp
86230557SjimharrisThe name to use to store the leapfile on the local system.
87230557Sjimharris$LEAPFILE
88230557Sjimharris.It  Fl e Ar string , Fl \-expiration Ns = Ns Ar string 
89230557SjimharrisRefresh the leapfile this long before it expires.
90230557Sjimharris.sp
91230557SjimharrisSpecify how long before expiration the file is to be refreshed
92230557SjimharrisUnits are required, e.g. "\-e 60 days"  Note that larger values
93230557Sjimharrisimply more frequent refreshes.
94230557Sjimharris"$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