update-leap.mdoc.in revision 310419
177542Swpaul.Dd November 21 2016
277542Swpaul.Dt UPDATE_LEAP 1update-leapmdoc User Commands
377542Swpaul.Os
477542Swpaul.\"  EDIT THIS FILE WITH CAUTION  (update-leap-opts.mdoc)
577542Swpaul.\"
677542Swpaul.\"  It has been AutoGen-ed  November 21, 2016 at 07:59:20 AM by AutoGen 5.18.5
777542Swpaul.\"  From the definitions    update-leap-opts.def
877542Swpaul.\"  and the template file   agmdoc-cmd.tpl
977542Swpaul.Sh NAME
1077542Swpaul.Nm update-leap
1177542Swpaul.Nd leap-seconds file manager/updater
1277542Swpaul.Sh SYNOPSIS
1377542Swpaul.Nm
1477542Swpaul.\" Mixture of short (flag) options and long options
1577542Swpaul.Op Fl flags
1677542Swpaul.Op Fl flag Op Ar value
1777542Swpaul.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
1877542Swpaul.Pp
1977542SwpaulAll arguments must be options.
2077542Swpaul.Pp
2177542Swpaul.Sh DESCRIPTION
2277542Swpaul.Nm
2377542Swpaulwill validate the file currently on the local system
2477542Swpauland if necessary, updates leap\-second definition file.
2577542Swpaul.Pp
2677542SwpaulOrdinarily, the file is found using the "leapfile" directive in
2777542Swpaul.Xr ntp.conf 5 .
2877542SwpaulHowever, an alternate location can be specified on the command line.
2977542Swpaul.Pp
3077542SwpaulIf the file does not exist, is not valid, has expired, or is expiring soon,
3177542Swpaula new copy will be downloaded.  If the new copy validates, it is installed and
3277542SwpaulNTP is (optionally) restarted.
3377542Swpaul.Pp
3477542SwpaulIf the current file is acceptable, no download or restart occurs.
3577542Swpaul.Pp
3677542Swpaul-c can also be used to invoke another script to perform administrative
3777542Swpaulfunctions, e.g. to copy the file to other local systems.
3877542Swpaul.PP
3977542SwpaulThis can be run as a cron job.  As the file is rarely updated, and leap
4077542Swpaulseconds are announced at least one month in advance (usually longer), it
4177542Swpaulneed not be run more frequently than about once every three weeks.
4277542Swpaul.PP
4377542SwpaulFor cron\-friendly behavior, define CRONJOB=1 in the crontab.
4477542Swpaul.PP
4577542SwpaulThis script depends on$REQUIREDCMDS
4677542Swpaul.Sh "OPTIONS"
4777542Swpaul.Bl -tag
4877542Swpaul.It  Fl s Ar string , Fl \-source\-url Ns = Ns Ar string 
4977542SwpaulThe URL of the master copy of the leapseconds file.
5077542Swpaul.sp
5177542SwpaulSpecify the URL of the master copy to download
5277542Swpaul$LEAPSRC
5377542Swpaul.It  Fl 4 , Fl \-ipv4 
5477542SwpaulUse only IPv4 addresses for DNS name resolution.
5577542SwpaulThis option must not appear in combination with any of the following options:
5677542Swpaulipv6.
5777542Swpaul.sp
5877542Swpaul        Force DNS resolution of following host names on the command line
5977542Swpaul        to the IPv4 namespace.
6077542Swpaul        _EndOfDoc_;
6177542Swpaul};
6277542Swpaul.sp
6377542Swpaulflag = {
6477542Swpaul    name      = ipv6;
6577542Swpaul    flags\-cant = ipv4, prefer;
6677542Swpaul    value     = 6;
6777542Swpaul    descrip   = "Use only IPv6 addresses for DNS name resolution";
6877542Swpaul    doc = <<\-  _EndOfDoc_
69113038Sobrien        Force DNS resolution of following host names on the command line
70113038Sobrien        to the IPv6 namespace.
71113038Sobrien        _EndOfDoc_;
7277542Swpaul};
7377542Swpaul.sp
7477542Swpaulflag = {
7577542Swpaul    name        = prefer;
7677542Swpaul    flags\-cant	= ipv4, ipv6;
7777542Swpaul    value	= p;
7877542Swpaul    arg\-type    = keyword;
7977542Swpaul    keyword	= 4, 6;
8077542Swpaul    descrip     = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
8177542Swpaul    doc         = <<\-  _EndOfDoc_
8277542SwpaulPrefer IPv4 or IPv6 (as specified) addresses, but use either.
8377542Swpaul.It  Fl d Ar float , Fl \-destination Ns = Ns Ar float 
8477542SwpaulFilename on the local system.
8577542Swpaul.sp
8677542SwpaulThe name to use to store the leapfile on the local system.
8777542Swpaul$LEAPFILE
8877542Swpaul.It  Fl e Ar string , Fl \-expiration Ns = Ns Ar string 
8977542SwpaulRefresh the leapfile this long before it expires.
9077542Swpaul.sp
9177542SwpaulSpecify how long before expiration the file is to be refreshed
9277542SwpaulUnits are required, e.g. "\-e 60 days"  Note that larger values
9377542Swpaulimply more frequent refreshes.
9477542Swpaul"$PREFETCH"
9577542Swpaul.It  Fl f Ar string , Fl \-ntp\-conf\-file Ns = Ns Ar string 
9677542SwpaulLocation of the ntp.conf file.
9777542Swpaul.sp
9877542SwpaulSpecify location of ntp.conf (used to make sure leapfile directive is
9977542Swpaulpresent and to default  leapfile)
10077542Swpaul/etc/ntp.conf
101119291Simp.It  Fl F , Fl \-force\-update 
102119291SimpForce update of the leapfile.
10377542Swpaul.sp
10477542SwpaulForce update even if current file is OK and not close to expiring.
10577542Swpaul.It  Fl \-dont\-wait 
10677542SwpaulDon't wait for keystroke between plots.
10777542Swpaul.sp
10877542Swpaul.It Fl \&? , Fl \-help
10977542SwpaulDisplay usage information and exit.
11077542Swpaul.It Fl \&! , Fl \-more\-help
11177542SwpaulPass the extended usage information through a pager.
11277542Swpaul.It Fl v Op Brq Ar v|c|n  Fl \-version Op Brq Ar v|c|n
11377542SwpaulOutput version of program and exit.  The default mode is `v', a simple
11477542Swpaulversion.  The `c' mode will print copyright information and `n' will
11577542Swpaulprint the full copyright notice.
11677542Swpaul.El
11777542Swpaul.Sh USAGE
11877542SwpaulUsage stuff
11999498Salfred.Sh "EXIT STATUS"
12099498SalfredOne of the following exit values will be returned:
12199498Salfred.Bl -tag
12277542Swpaul.It 0 " (EXIT_SUCCESS)"
12399498SalfredSuccessful program execution.
12499498Salfred.It 1 " (EXIT_FAILURE)"
12599498SalfredThe operation failed or the command syntax was not valid.
12699498Salfred.It 70 " (EX_SOFTWARE)"
12777542Swpaullibopts had an internal operational error.  Please report
12899498Salfredit to autogen\-users@lists.sourceforge.net.  Thank you.
12999498Salfred.El
13099498Salfred.Sh AUTHORS
13199498Salfred.An "Timothe Litt"
13299498Salfred.Sh "NOTES"
13399498SalfredThis manual page was \fIAutoGen\fP\-erated from the \fBupdate\-leap\fP
13499498Salfredoption definitions.
13599498Salfred