commit | author | age
|
8a614a
|
1 |
'\" te |
BU |
2 |
.\" CDDL HEADER START |
|
3 |
.\" |
|
4 |
.\" The contents of this file are subject to the terms of the |
|
5 |
.\" Common Development and Distribution License (the "License"). |
|
6 |
.\" You may not use this file except in compliance with the License. |
|
7 |
.\" |
|
8 |
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
.\" or http://www.opensolaris.org/os/licensing. |
|
10 |
.\" See the License for the specific language governing permissions |
|
11 |
.\" and limitations under the License. |
|
12 |
.\" |
|
13 |
.\" When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
.\" If applicable, add the following below this CDDL HEADER, with the |
|
16 |
.\" fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
.\" information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
.\" |
|
19 |
.\" CDDL HEADER END |
|
20 |
.\" |
|
21 |
.\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. |
|
22 |
.\" |
|
23 |
.TH "ntprc" "4" "" "" "File Formats" |
|
24 |
.SH NAME |
|
25 |
ntprc \- file to initialize perferences for NTP programs |
|
26 |
.SH DESCRIPTION |
|
27 |
.LP |
|
28 |
The \fB\&.ntprc\fR file contains data used to initialize certain parameters |
|
29 |
for various NTP related programs. When these programs are started, the current |
|
30 |
directory is searched for the existence of the \fB\&.ntprc\fR file. |
|
31 |
If found, the file is read and searched for a section header that specifies |
|
32 |
the program being run. If such a section is found, then the lines in that section are used to initialize the program. If such a section is not found and no |
|
33 |
other sections are found, then the whole file is used do the initialization. |
|
34 |
If the file is not found in the current directory, the users home directory is |
|
35 |
searched if found then it is processed as above. |
|
36 |
.LP |
|
37 |
The \fB.ntprc\fR file is a text file, with each line specifying the settings of a command line flag. The flags |
|
38 |
are indicated by the use of the flag's long name. Anything after the long name on the line is used to |
|
39 |
set the value of the flag if it takes a value. The same file is used by several \fBNTP\fR programs, so to separate |
|
40 |
which lines go with which programs, the file is split into sections. Each section is marked with the name |
|
41 |
of the corresponding program in all capital letters and inside square brackets. Comments can be given in the |
|
42 |
file by beginning the comment line with a "#" in the first column. |
|
43 |
.LP |
|
44 |
The best way to set the lines in the file is to run the command in question with all of the flags the way |
|
45 |
you want them and to give the \fB--save-opts\fR \fIfilename\fR flag at the end to save the parameters to a |
|
46 |
file. After that, simply edit the resulting file to remove the comments and add the section header and |
|
47 |
then append the file to the \fB.ntprc\fR file. |
|
48 |
.SH EXAMPLES |
|
49 |
.LP |
|
50 |
\fBExample 1 \fRA Sample \fB\&.ntprc\fR File |
|
51 |
.LP |
|
52 |
A \fB\&.ntprc\fR file containing the following lines: |
|
53 |
.sp |
|
54 |
.in +2 |
|
55 |
.nf |
|
56 |
[NTPQ] |
|
57 |
numeric |
|
58 |
command rv 0 |
|
59 |
[NTPDC] |
|
60 |
peers |
|
61 |
.fi |
|
62 |
.in -2 |
|
63 |
|
|
64 |
.LP |
|
65 |
will force the \fBntpq\fR program to always execute the "rv 0" command and print the results |
|
66 |
with IP addresses and not hostname. It will also cause the \fBntpdc\fR program to always run |
|
67 |
as if the \fB--peers\fR option was given. |
|
68 |
.SH FILES |
|
69 |
.sp |
|
70 |
.ne 2 |
|
71 |
.mk |
|
72 |
.na |
|
73 |
\fB\fB~/.ntprc\fR\fR |
|
74 |
.ad |
|
75 |
.RS 12n |
|
76 |
.rt |
|
77 |
|
|
78 |
.RE |
|
79 |
.SH SEE ALSO |
|
80 |
.LP |
|
81 |
\fBntpq\fR(1M), \fBntpdc\fR(1M), \fBntp-keygen\fR(1M) |