1NTPLEAPFETCH(8) NTPsec NTPLEAPFETCH(8)
2
3
4
6 ntpleapfetch - leap-seconds file manager/updater
7
9 ntpleapfetch
10 [-46] [-c command] [-e expiry] [-f config] [-F] [-h]
11 [-i interval] [-l] [L] [-p {4|6}] [-P logfacility] [-q]
12 [-r retries] [-s source-url] [-t path] [-v] [-z path]
13 [-Z] [leapfile] [-V | --version] [filename]
14
16 ntpleapfetch will validate the file currently on the local system and
17 if necessary, update leap second definition file.
18
19 Ordinarily, the file is found using the "leapfile" directive in
20 ntp.conf(5). However, an alternate location can be specified on the
21 command line.
22
23 If the file does not exist, is not valid, has expired, or is expiring
24 soon, a new copy will be downloaded. If the new copy validates, it is
25 installed and NTP is (optionally) restarted.
26
27 If the current file is acceptable, no download or restart occurs.
28
29 -c can also be used to invoke another script to perform administrative
30 functions, e.g. to copy the file to other local systems.
31
32 This can be run as a cron job. As the file is rarely updated, and leap
33 seconds are announced at least one month in advance (usually longer),
34 it need not be run more frequently than about once every three weeks.
35
36 For cron-friendly behavior, define CRONJOB=1 in the crontab.
37
39 -4
40 Use only IPv4 addresses for DNS name resolution. This option must
41 not appear in combination with -6.
42
43 -6
44 Use only IPv6 addresses for DNS name resolution. This option must
45 not appear in combination with -4.
46
47 -c
48 Command to restart ntpd after installing a new file. Without such a
49 command, ntpd checks the file daily.
50
51 -e expiry
52 Refresh the leapfile this long before it expires.
53
54 Specify how long before expiration the file is to be refreshed.
55 Units are required, e.g. "-e 60 days". Note that larger values
56 imply more frequent refreshes.
57
58 -f config
59 Location of the ntp.conf file.
60
61 Specify location of ntp.conf, which defaults to /etc/ntp.conf. It
62 is read to make sure the "leapfile" directive is present and to
63 determine the default path to the leapfile.
64
65 -F
66 Force update even if current file is OK and not close to expiring.
67
68 -i interval
69 Number of minutes between retries.
70
71 -h
72 Display inline help.
73
74 -l
75 Use syslog for output (Implied if CRONJOB is set).
76
77 -L
78 Don’t use syslog for output
79
80 -p {4|6}
81 Prefer IPv4 or IPv6 (as specified) addresses, but use either.
82
83 -P logfacility
84 Specify the syslog facility for logging.
85
86 -q
87 Only report errors to stdout.
88
89 -r retries
90 Number of retries.
91
92 -s source-url
93 The URL of the master copy of the leapseconds file.
94
95 -t path
96 Name of temporary file used in validation.
97
98 -v
99 Verbose output.
100
101 -z path
102 Specify path for utilities.
103
104 -Z
105 Use system path only.
106
107 -V, --version
108 Print the version string and exit.
109
110 leapfile
111 An alternate location to download the leapseconds file to.
112
114 One of the following exit values will be returned:
115
116 0 (EXIT_SUCCESS)
117 Successful program execution.
118
119 1 (EXIT_FAILURE)
120 The operation failed or the command syntax was not valid.
121
122 2
123 Internal error - restart command failed.
124
126 Timothe Litt
127
128
129
130NTPsec 2021-07-22 NTPLEAPFETCH(8)