update-leap.1update-leapmdoc revision 310419
119370Spst.Dd November 21 2016
298944Sobrien.Dt UPDATE_LEAP 1update-leapmdoc User Commands
398944Sobrien.Os
419370Spst.\"  EDIT THIS FILE WITH CAUTION  (update-leap-opts.mdoc)
598944Sobrien.\"
619370Spst.\"  It has been AutoGen-ed  November 21, 2016 at 07:59:20 AM by AutoGen 5.18.5
798944Sobrien.\"  From the definitions    update-leap-opts.def
898944Sobrien.\"  and the template file   agmdoc-cmd.tpl
998944Sobrien.Sh NAME
1098944Sobrien.Nm update-leap
1119370Spst.Nd leap-seconds file manager/updater
1298944Sobrien.Sh SYNOPSIS
1398944Sobrien.Nm
1498944Sobrien.\" Mixture of short (flag) options and long options
1598944Sobrien.Op Fl flags
1619370Spst.Op Fl flag Op Ar value
1798944Sobrien.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
1898944Sobrien.Pp
1998944SobrienAll arguments must be options.
2098944Sobrien.Pp
2119370Spst.Sh DESCRIPTION
2219370Spst.Nm
2346283Sdfrwill validate the file currently on the local system
2446283Sdfrand if necessary, updates leap\-second definition file.
2546283Sdfr.Pp
26130803SmarcelOrdinarily, the file is found using the "leapfile" directive in
27130803Smarcel.Xr ntp.conf 5 .
2846283SdfrHowever, an alternate location can be specified on the command line.
29130803Smarcel.Pp
3046283SdfrIf the file does not exist, is not valid, has expired, or is expiring soon,
3146283Sdfra new copy will be downloaded.  If the new copy validates, it is installed and
3298944SobrienNTP is (optionally) restarted.
3319370Spst.Pp
3498944SobrienIf the current file is acceptable, no download or restart occurs.
3519370Spst.Pp
3698944Sobrien-c can also be used to invoke another script to perform administrative
3798944Sobrienfunctions, e.g. to copy the file to other local systems.
3898944Sobrien.PP
3919370SpstThis can be run as a cron job.  As the file is rarely updated, and leap
4098944Sobrienseconds are announced at least one month in advance (usually longer), it
4198944Sobrienneed not be run more frequently than about once every three weeks.
4298944Sobrien.PP
4319370SpstFor cron\-friendly behavior, define CRONJOB=1 in the crontab.
4498944Sobrien.PP
4598944SobrienThis script depends on$REQUIREDCMDS
4619370Spst.Sh "OPTIONS"
4719370Spst.Bl -tag
4819370Spst.It  Fl s Ar string , Fl \-source\-url Ns = Ns Ar string 
4998944SobrienThe URL of the master copy of the leapseconds file.
5019370Spst.sp
5198944SobrienSpecify the URL of the master copy to download
5298944Sobrien$LEAPSRC
5398944Sobrien.It  Fl 4 , Fl \-ipv4 
5419370SpstUse only IPv4 addresses for DNS name resolution.
55130803SmarcelThis option must not appear in combination with any of the following options:
56130803Smarcelipv6.
57130803Smarcel.sp
58130803Smarcel        Force DNS resolution of following host names on the command line
59130803Smarcel        to the IPv4 namespace.
60130803Smarcel        _EndOfDoc_;
61130803Smarcel};
6298944Sobrien.sp
6319370Spstflag = {
6498944Sobrien    name      = ipv6;
6519370Spst    flags\-cant = ipv4, prefer;
6619370Spst    value     = 6;
6719370Spst    descrip   = "Use only IPv6 addresses for DNS name resolution";
6898944Sobrien    doc = <<\-  _EndOfDoc_
6919370Spst        Force DNS resolution of following host names on the command line
7019370Spst        to the IPv6 namespace.
7119370Spst        _EndOfDoc_;
7219370Spst};
7319370Spst.sp
7446283Sdfrflag = {
7546283Sdfr    name        = prefer;
7698944Sobrien    flags\-cant	= ipv4, ipv6;
7798944Sobrien    value	= p;
7819370Spst    arg\-type    = keyword;
7998944Sobrien    keyword	= 4, 6;
8019370Spst    descrip     = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
8198944Sobrien    doc         = <<\-  _EndOfDoc_
8298944SobrienPrefer IPv4 or IPv6 (as specified) addresses, but use either.
8398944Sobrien.It  Fl d Ar float , Fl \-destination Ns = Ns Ar float 
8498944SobrienFilename on the local system.
8519370Spst.sp
8698944SobrienThe name to use to store the leapfile on the local system.
8719370Spst$LEAPFILE
8898944Sobrien.It  Fl e Ar string , Fl \-expiration Ns = Ns Ar string 
8946283SdfrRefresh the leapfile this long before it expires.
9046283Sdfr.sp
9198944SobrienSpecify 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