xref: /freebsd/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
1.Dd January 20 2016
2.Dt UPDATE_LEAP 1update-leapmdoc User Commands
3.Os
4.\"  EDIT THIS FILE WITH CAUTION  (update-leap-opts.mdoc)
5.\"
6.\"  It has been AutoGen-ed  January 20, 2016 at 04:10:28 AM by AutoGen 5.18.5
7.\"  From the definitions    update-leap-opts.def
8.\"  and the template file   agmdoc-cmd.tpl
9.Sh NAME
10.Nm update-leap
11.Nd leap-seconds file manager/updater
12.Sh SYNOPSIS
13.Nm
14.\" Mixture of short (flag) options and long options
15.Op Fl flags
16.Op Fl flag Op Ar value
17.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
18.Pp
19All arguments must be options.
20.Pp
21.Sh DESCRIPTION
22.Nm
23will validate the file currently on the local system
24and if necessary, updates leap\-second definition file.
25.Pp
26Ordinarily, the file is found using the "leapfile" directive in
27.Xr ntp.conf 5 .
28However, an alternate location can be specified on the command line.
29.Pp
30If the file does not exist, is not valid, has expired, or is expiring soon,
31a new copy will be downloaded.  If the new copy validates, it is installed and
32NTP is (optionally) restarted.
33.Pp
34If the current file is acceptable, no download or restart occurs.
35.Pp
36-c can also be used to invoke another script to perform administrative
37functions, e.g. to copy the file to other local systems.
38.PP
39This can be run as a cron job.  As the file is rarely updated, and leap
40seconds are announced at least one month in advance (usually longer), it
41need not be run more frequently than about once every three weeks.
42.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