xref: /freebsd/contrib/ntp/scripts/update-leap/update-leap.mdoc.in (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1*f5f40dd6SCy Schubert.Dd May 25 2024
2a25439b6SCy Schubert.Dt UPDATE_LEAP 1update-leapmdoc User Commands
3a25439b6SCy Schubert.Os
4a25439b6SCy Schubert.\"  EDIT THIS FILE WITH CAUTION  (update-leap-opts.mdoc)
5a25439b6SCy Schubert.\"
6*f5f40dd6SCy Schubert.\"  It has been AutoGen-ed  May 25, 2024 at 12:05:51 AM by AutoGen 5.18.16
7a25439b6SCy Schubert.\"  From the definitions    update-leap-opts.def
8a25439b6SCy Schubert.\"  and the template file   agmdoc-cmd.tpl
9a25439b6SCy Schubert.Sh NAME
10a25439b6SCy Schubert.Nm update-leap
11a25439b6SCy Schubert.Nd leap-seconds file manager/updater
12a25439b6SCy Schubert.Sh SYNOPSIS
13a25439b6SCy Schubert.Nm
14a25439b6SCy Schubert.\" Mixture of short (flag) options and long options
15a25439b6SCy Schubert.Op Fl flags
16a25439b6SCy Schubert.Op Fl flag Op Ar value
17a25439b6SCy Schubert.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
18a25439b6SCy Schubert.Pp
19a25439b6SCy SchubertAll arguments must be options.
20a25439b6SCy Schubert.Pp
21a25439b6SCy Schubert.Sh DESCRIPTION
22a25439b6SCy Schubert.Nm
23a25439b6SCy Schubertwill validate the file currently on the local system
24a25439b6SCy Schubertand if necessary, updates leap\-second definition file.
25a25439b6SCy Schubert.Pp
26a25439b6SCy SchubertOrdinarily, the file is found using the "leapfile" directive in
27a25439b6SCy Schubert.Xr ntp.conf 5 .
28a25439b6SCy SchubertHowever, an alternate location can be specified on the command line.
29a25439b6SCy Schubert.Pp
30a25439b6SCy SchubertIf the file does not exist, is not valid, has expired, or is expiring soon,
31a25439b6SCy Schuberta new copy will be downloaded.  If the new copy validates, it is installed and
32a25439b6SCy SchubertNTP is (optionally) restarted.
33a25439b6SCy Schubert.Pp
34a25439b6SCy SchubertIf the current file is acceptable, no download or restart occurs.
35a25439b6SCy Schubert.Pp
36a25439b6SCy Schubert-c can also be used to invoke another script to perform administrative
37a25439b6SCy Schubertfunctions, e.g. to copy the file to other local systems.
38a25439b6SCy Schubert.PP
39a25439b6SCy SchubertThis can be run as a cron job.  As the file is rarely updated, and leap
40a25439b6SCy Schubertseconds are announced at least one month in advance (usually longer), it
41a25439b6SCy Schubertneed not be run more frequently than about once every three weeks.
42a25439b6SCy Schubert.PP
43a25439b6SCy SchubertFor cron\-friendly behavior, define CRONJOB=1 in the crontab.
44a25439b6SCy Schubert.PP
45a25439b6SCy SchubertThis script depends on$REQUIREDCMDS
46a25439b6SCy Schubert.Sh "OPTIONS"
47a25439b6SCy Schubert.Bl -tag
48a25439b6SCy Schubert.It  Fl s Ar string , Fl \-source\-url Ns = Ns Ar string
49a25439b6SCy SchubertThe URL of the master copy of the leapseconds file.
50a25439b6SCy Schubert.sp
51a25439b6SCy SchubertSpecify the URL of the master copy to download
52a25439b6SCy Schubert$LEAPSRC
53a25439b6SCy Schubert.It  Fl 4 , Fl \-ipv4
54a25439b6SCy SchubertUse only IPv4 addresses for DNS name resolution.
55a25439b6SCy SchubertThis option must not appear in combination with any of the following options:
56a25439b6SCy Schubertipv6.
57a25439b6SCy Schubert.sp
58a25439b6SCy Schubert        Force DNS resolution of following host names on the command line
59a25439b6SCy Schubert        to the IPv4 namespace.
60a25439b6SCy Schubert        _EndOfDoc_;
61a25439b6SCy Schubert};
62a25439b6SCy Schubert.sp
63a25439b6SCy Schubertflag = {
64a25439b6SCy Schubert    name      = ipv6;
65a25439b6SCy Schubert    flags\-cant = ipv4, prefer;
66a25439b6SCy Schubert    value     = 6;
67a25439b6SCy Schubert    descrip   = "Use only IPv6 addresses for DNS name resolution";
68a25439b6SCy Schubert    doc = <<\-  _EndOfDoc_
69a25439b6SCy Schubert        Force DNS resolution of following host names on the command line
70a25439b6SCy Schubert        to the IPv6 namespace.
71a25439b6SCy Schubert        _EndOfDoc_;
72a25439b6SCy Schubert};
73a25439b6SCy Schubert.sp
74a25439b6SCy Schubertflag = {
75a25439b6SCy Schubert    name        = prefer;
76a25439b6SCy Schubert    flags\-cant	= ipv4, ipv6;
77a25439b6SCy Schubert    value	= p;
78a25439b6SCy Schubert    arg\-type    = keyword;
79a25439b6SCy Schubert    keyword	= 4, 6;
80a25439b6SCy Schubert    descrip     = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
81a25439b6SCy Schubert    doc         = <<\-  _EndOfDoc_
82a25439b6SCy SchubertPrefer IPv4 or IPv6 (as specified) addresses, but use either.
83a25439b6SCy Schubert.It  Fl d Ar float , Fl \-destination Ns = Ns Ar float
84a25439b6SCy SchubertFilename on the local system.
85a25439b6SCy Schubert.sp
86a25439b6SCy SchubertThe name to use to store the leapfile on the local system.
87a25439b6SCy Schubert$LEAPFILE
88a25439b6SCy Schubert.It  Fl e Ar string , Fl \-expiration Ns = Ns Ar string
89a25439b6SCy SchubertRefresh the leapfile this long before it expires.
90a25439b6SCy Schubert.sp
91a25439b6SCy SchubertSpecify how long before expiration the file is to be refreshed
92a25439b6SCy SchubertUnits are required, e.g. "\-e 60 days"  Note that larger values
93a25439b6SCy Schubertimply more frequent refreshes.
94a25439b6SCy Schubert"$PREFETCH"
95a25439b6SCy Schubert.It  Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string
96a25439b6SCy SchubertLocation of the ntp.conf file.
97a25439b6SCy Schubert.sp
98a25439b6SCy SchubertSpecify location of ntp.conf (used to make sure leapfile directive is
99a25439b6SCy Schubertpresent and to default  leapfile)
100a25439b6SCy Schubert/etc/ntp.conf
101a25439b6SCy Schubert.It  Fl F , Fl \-force\-update
102a25439b6SCy SchubertForce update of the leapfile.
103a25439b6SCy Schubert.sp
104a25439b6SCy SchubertForce update even if current file is OK and not close to expiring.
105a25439b6SCy Schubert.It  Fl \-dont\-wait
106a25439b6SCy SchubertDon't wait for keystroke between plots.
107a25439b6SCy Schubert.sp
108a25439b6SCy Schubert.It Fl \&? , Fl \-help
109a25439b6SCy SchubertDisplay usage information and exit.
110a25439b6SCy Schubert.It Fl \&! , Fl \-more\-help
111a25439b6SCy SchubertPass the extended usage information through a pager.
112a25439b6SCy Schubert.It Fl v Op Brq Ar v|c|n  Fl \-version Op Brq Ar v|c|n
113a25439b6SCy SchubertOutput version of program and exit.  The default mode is `v', a simple
114a25439b6SCy Schubertversion.  The `c' mode will print copyright information and `n' will
115a25439b6SCy Schubertprint the full copyright notice.
116a25439b6SCy Schubert.El
117a25439b6SCy Schubert.Sh USAGE
118a25439b6SCy SchubertUsage stuff
119a25439b6SCy Schubert.Sh "EXIT STATUS"
120a25439b6SCy SchubertOne of the following exit values will be returned:
121a25439b6SCy Schubert.Bl -tag
122a25439b6SCy Schubert.It 0 " (EXIT_SUCCESS)"
123a25439b6SCy SchubertSuccessful program execution.
124a25439b6SCy Schubert.It 1 " (EXIT_FAILURE)"
125a25439b6SCy SchubertThe operation failed or the command syntax was not valid.
126a25439b6SCy Schubert.It 70 " (EX_SOFTWARE)"
127a25439b6SCy Schubertlibopts had an internal operational error.  Please report
128a25439b6SCy Schubertit to autogen\-users@lists.sourceforge.net.  Thank you.
129a25439b6SCy Schubert.El
130a25439b6SCy Schubert.Sh AUTHORS
131a25439b6SCy Schubert.An "Timothe Litt"
132a25439b6SCy Schubert.Sh "NOTES"
133a25439b6SCy SchubertThis manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP
134a25439b6SCy Schubertoption definitions.
135