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