Set paths in documentation by configure

This commit is contained in:
Miroslav Lichvar 2013-05-16 12:28:37 +02:00
parent bc25380950
commit 51a2d8dfd8
8 changed files with 83 additions and 71 deletions

6
.gitignore vendored
View file

@ -4,11 +4,15 @@
*.swp *.swp
RELEASES RELEASES
Makefile Makefile
chrony.conf.5
chrony.info chrony.info
chrony.html chrony.html
chrony.texi
chrony.txt chrony.txt
chronyc chronyc
chronyd* chronyc.1
chronyd
chronyd.8
config.h config.h
config.log config.log
tags tags

View file

@ -77,6 +77,7 @@ $(HASH_OBJ) : $(patsubst %.o,%.c,$(HASH_OBJ))
distclean : clean distclean : clean
-rm -f Makefile -rm -f Makefile
-rm -f chrony.conf.5 chrony.texi chronyc.1 chronyd.8
clean : clean :
-rm -f *.o *.s chronyc chronyd core *~ chrony.info chrony.html chrony.txt -rm -f *.o *.s chronyc chronyd core *~ chrony.info chrony.html chrony.txt

View file

@ -3,7 +3,7 @@
chrony.conf \- chronyd configuration file chrony.conf \- chronyd configuration file
.SH SYNOPSIS .SH SYNOPSIS
.B /etc/chrony.conf .B @SYSCONFDIR@/chrony.conf
.SH DESCRIPTION .SH DESCRIPTION
\fIchrony\fR is a pair of programs for maintaining the accuracy of computer \fIchrony\fR is a pair of programs for maintaining the accuracy of computer
@ -12,7 +12,7 @@ boot time.
Assuming that you have found some servers, you need to set up a Assuming that you have found some servers, you need to set up a
configuration file to run \fIchrony\fR. The (compiled-in) default location configuration file to run \fIchrony\fR. The (compiled-in) default location
for this file is \fB/etc/chrony.conf\fR. Assuming that your ntp servers for this file is \fB@SYSCONFDIR@/chrony.conf\fR. Assuming that your ntp servers
are called `a.b.c' and `d.e.f', your \fBchrony.conf\fR file could contain are called `a.b.c' and `d.e.f', your \fBchrony.conf\fR file could contain
as a minimum as a minimum
@ -29,9 +29,9 @@ useful configuration file would look something like
server a.b.c server a.b.c
server d.e.f server d.e.f
server g.h.i server g.h.i
keyfile /etc/chrony.keys keyfile @SYSCONFDIR@/chrony.keys
commandkey 1 commandkey 1
driftfile /etc/chrony.drift driftfile @SYSCONFDIR@/chrony.drift
.SH "SEE ALSO" .SH "SEE ALSO"

View file

@ -564,7 +564,7 @@ use their facilities.
Assuming that you have found some servers, you need to set up a Assuming that you have found some servers, you need to set up a
configuration file to run chrony. The (compiled-in) default location configuration file to run chrony. The (compiled-in) default location
for this file is @file{/etc/chrony.conf}. Assuming that your ntp for this file is @file{@SYSCONFDIR@/chrony.conf}. Assuming that your ntp
servers are called @code{a.b.c} and @code{d.e.f}, your servers are called @code{a.b.c} and @code{d.e.f}, your
@file{chrony.conf} file could contain as a minimum @file{chrony.conf} file could contain as a minimum
@ -583,9 +583,9 @@ useful configuration file would look something like
server a.b.c server a.b.c
server d.e.f server d.e.f
server g.h.i server g.h.i
keyfile /etc/chrony.keys keyfile @SYSCONFDIR@/chrony.keys
commandkey 1 commandkey 1
driftfile /etc/chrony.drift driftfile @SYSCONFDIR@/chrony.drift
@end example @end example
@c }}} @c }}}
@c {{{ S:Infrequent connection @c {{{ S:Infrequent connection
@ -595,7 +595,7 @@ In this section we discuss how to configure chrony for computers that
have occasional connections to the internet. have occasional connections to the internet.
@menu @menu
* Configuration for infrequent connections:: How to set up the @code{/etc/chrony} file * Configuration for infrequent connections:: How to set up the @code{@SYSCONFDIR@/chrony.conf} file
* Advising chronyd of internet availability:: How to tell chronyd when the link is available * Advising chronyd of internet availability:: How to tell chronyd when the link is available
@end menu @end menu
@ -654,14 +654,14 @@ comes before @samp{dns} in the @samp{hosts} line of the
In order to notify @code{chronyd} of the presence of the link, you will need to In order to notify @code{chronyd} of the presence of the link, you will need to
be able to log in to it with the program chronyc. To do this, @code{chronyd} be able to log in to it with the program chronyc. To do this, @code{chronyd}
needs to be configured with an administrator password. To set up an needs to be configured with an administrator password. To set up an
administrator password, you can create a file @file{/etc/chrony.keys} administrator password, you can create a file @file{@SYSCONFDIR@/chrony.keys}
containing a single line containing a single line
@example @example
1 xyzzy 1 xyzzy
@end example @end example
and add the following line to @file{/etc/chrony.conf} (the order of the and add the following line to @file{@SYSCONFDIR@/chrony.conf} (the order of the
lines does not matter) lines does not matter)
@example @example
@ -674,9 +674,9 @@ The smallest useful configuration file would look something like
server 1.2.3.4 offline server 1.2.3.4 offline
server 5.6.7.8 offline server 5.6.7.8 offline
server 9.10.11.12 offline server 9.10.11.12 offline
keyfile /etc/chrony.keys keyfile @SYSCONFDIR@/chrony.keys
commandkey 1 commandkey 1
driftfile /etc/chrony.drift driftfile @SYSCONFDIR@/chrony.drift
@end example @end example
The next section describes how to tell @code{chronyd} when the internet link The next section describes how to tell @code{chronyd} when the internet link
@ -685,27 +685,27 @@ goes up and down.
@node Advising chronyd of internet availability @node Advising chronyd of internet availability
@subsection How to tell chronyd when the internet link is available. @subsection How to tell chronyd when the internet link is available.
To use this option, you will need to configure a command key in To use this option, you will need to configure a command key in
@code{chronyd's} configuration file @file{/etc/chrony.conf}, as described in @code{chronyd's} configuration file @file{@SYSCONFDIR@/chrony.conf}, as described in
the previous section. the previous section.
To tell @code{chronyd} when to start and finish sampling the servers, the To tell @code{chronyd} when to start and finish sampling the servers, the
@code{online} and @code{offline} commands of chronyc need to be used. @code{online} and @code{offline} commands of chronyc need to be used.
To give an example of their use, we assume that @code{pppd} is the To give an example of their use, we assume that @code{pppd} is the
program being used to connect to the internet, and that chronyc has been program being used to connect to the internet, and that chronyc has been
installed at its default location @file{/usr/local/bin/chronyc}. We installed at its default location @file{@BINDIR@/chronyc}. We
also assume that the command key has been set up as described in the also assume that the command key has been set up as described in the
previous section. previous section.
In the file @file{/etc/ppp/ip-up} we add the command sequence In the file @file{/etc/ppp/ip-up} we add the command sequence
@example @example
/usr/local/bin/chronyc -a online @BINDIR@/chronyc -a online
@end example @end example
and in the file @file{/etc/ppp/ip-down} we add the sequence and in the file @file{/etc/ppp/ip-down} we add the sequence
@example @example
/usr/local/bin/chronyc -a offline @BINDIR@/chronyc -a offline
@end example @end example
@code{chronyd's} polling of the servers will now only occur whilst the @code{chronyd's} polling of the servers will now only occur whilst the
@ -740,9 +740,9 @@ be (assuming the clients are in the 192.168.165.x subnet and that the
master's address is 192.168.169.170) master's address is 192.168.169.170)
@example @example
driftfile /etc/chrony.drift driftfile @SYSCONFDIR@/chrony.drift
commandkey 25 commandkey 25
keyfile /etc/chrony.keys keyfile @SYSCONFDIR@/chrony.keys
initstepslew 10 client1 client3 client6 initstepslew 10 client1 client3 client6
local stratum 8 local stratum 8
manual manual
@ -754,10 +754,10 @@ the configuration file might be
@example @example
server master server master
driftfile /etc/chrony.drift driftfile @SYSCONFDIR@/chrony.drift
logdir /var/log/chrony logdir /var/log/chrony
log measurements statistics tracking log measurements statistics tracking
keyfile /etc/chrony.keys keyfile @SYSCONFDIR@/chrony.keys
commandkey 24 commandkey 24
local stratum 10 local stratum 10
initstepslew 20 master initstepslew 20 master
@ -889,7 +889,7 @@ option should not be used if you want your disc to spin down.
To illustrate how a dial-up home computer might be configured, example To illustrate how a dial-up home computer might be configured, example
configuration files are shown in this section. configuration files are shown in this section.
For the @file{/etc/chrony.conf} file, the following can be used as an For the @file{@SYSCONFDIR@/chrony.conf} file, the following can be used as an
example. @emph{NOTE : The @code{server} directives are only applicable example. @emph{NOTE : The @code{server} directives are only applicable
to customers of Demon Internet; users of other ISPs will need to use to customers of Demon Internet; users of other ISPs will need to use
their own ISP's NTP servers or public NTP servers.} their own ISP's NTP servers or public NTP servers.}
@ -900,13 +900,13 @@ server 158.152.1.76 minpoll 5 maxpoll 10 maxdelay 0.4 offline
server 194.159.253.2 minpoll 5 maxpoll 10 maxdelay 0.4 offline server 194.159.253.2 minpoll 5 maxpoll 10 maxdelay 0.4 offline
logdir /var/log/chrony logdir /var/log/chrony
log statistics measurements tracking log statistics measurements tracking
driftfile /etc/chrony.drift driftfile @SYSCONFDIR@/chrony.drift
keyfile /etc/chrony.keys keyfile @SYSCONFDIR@/chrony.keys
commandkey 25 commandkey 25
maxupdateskew 100.0 maxupdateskew 100.0
dumponexit dumponexit
dumpdir /var/log/chrony dumpdir /var/log/chrony
rtcfile /etc/chrony.rtc rtcfile @SYSCONFDIR@/chrony.rtc
@end example @end example
With Freeserve as the ISP, I use the following server lines : With Freeserve as the ISP, I use the following server lines :
@ -924,13 +924,13 @@ online and offline respectively.
The relevant part of the @file{/etc/ppp/ip-up} file is The relevant part of the @file{/etc/ppp/ip-up} file is
@example @example
/usr/local/bin/chronyc -a online @BINDIR@/chronyc -a online
@end example @end example
and the relevant part of the @file{/etc/ppp/ip-down} script is and the relevant part of the @file{/etc/ppp/ip-down} script is
@example @example
/usr/local/bin/chronyc -a <<EOF @BINDIR@/chronyc -a <<EOF
offline offline
dump dump
writertc writertc
@ -945,8 +945,8 @@ To start @code{chronyd} during the boot sequence, I have the following
in @file{/etc/rc.d/rc.local} (this is a Slackware system) in @file{/etc/rc.d/rc.local} (this is a Slackware system)
@example @example
if [ -f /usr/local/sbin/chronyd -a -f /etc/chrony.conf ]; then if [ -f @SBINDIR@/chronyd -a -f @SYSCONFDIR@/chrony.conf ]; then
/usr/local/sbin/chronyd -r -s @SBINDIR@/chronyd -r -s
echo "Start chronyd" echo "Start chronyd"
fi fi
@end example @end example
@ -997,14 +997,14 @@ determination is taking place.
To avoid this problem, @code{chronyd} allows the gain or loss rate to be To avoid this problem, @code{chronyd} allows the gain or loss rate to be
stored in a file, which can be read back in when the program is stored in a file, which can be read back in when the program is
restarted. This file is called the drift file, and might typically be restarted. This file is called the drift file, and might typically be
stored in @file{/etc/chrony.drift}. By specifying an option like the stored in @file{@SYSCONFDIR@/chrony.drift}. By specifying an option like the
following following
@example @example
driftfile /etc/chrony.drift driftfile @SYSCONFDIR@/chrony.drift
@end example @end example
in the configuration file (@file{/etc/chrony.conf}), the drift file in the configuration file (@file{@SYSCONFDIR@/chrony.conf}), the drift file
facility will be activated. facility will be activated.
@c }}} @c }}}
@c }}} @c }}}
@ -1023,11 +1023,11 @@ facility will be activated.
@node Starting chronyd @node Starting chronyd
@section Starting chronyd @section Starting chronyd
If @code{chronyd} has been installed to its default location If @code{chronyd} has been installed to its default location
@file{/usr/local/sbin/chronyd}, starting it is simply a matter of @file{@SBINDIR@/chronyd}, starting it is simply a matter of
entering the command entering the command
@example @example
/usr/local/sbin/chronyd @SBINDIR@/chronyd
@end example @end example
Information messages and warnings will be logged to syslog. Information messages and warnings will be logged to syslog.
@ -1044,7 +1044,7 @@ terminal, and all messages will be sent to the terminal instead of to
syslog. syslog.
@item -f <conf-file> @item -f <conf-file>
This option can be used to specify an alternate location for the This option can be used to specify an alternate location for the
configuration file (default @file{/etc/chrony.conf}). configuration file (default @file{@SYSCONFDIR@/chrony.conf}).
@item -r @item -r
This option will reload sample histories for each of the servers being This option will reload sample histories for each of the servers being
used. These histories are created by using the @code{dump} command in used. These histories are created by using the @code{dump} command in
@ -1125,7 +1125,7 @@ killproc() @{ # kill the named process(es)
case "$1" in case "$1" in
'start') 'start')
if [ -f /opt/free/sbin/chronyd -a -f /etc/chrony.conf ]; then if [ -f /opt/free/sbin/chronyd -a -f @SYSCONFDIR@/chrony.conf ]; then
/opt/free/sbin/chronyd /opt/free/sbin/chronyd
fi fi
;; ;;
@ -1150,7 +1150,7 @@ service.)
@node Configuration file @node Configuration file
@section The chronyd configuration file @section The chronyd configuration file
@c {{{ section top @c {{{ section top
The configuration file is normally called @file{/etc/chrony.conf}; in The configuration file is normally called @file{@SYSCONFDIR@/chrony.conf}; in
fact, this is the compiled-in default. However, other locations can be fact, this is the compiled-in default. However, other locations can be
specified with a command line option. specified with a command line option.
@ -1568,7 +1568,7 @@ which the true rate actually lies.
An example of the driftfile command is An example of the driftfile command is
@example @example
driftfile /etc/chrony.drift driftfile @SYSCONFDIR@/chrony.drift
@end example @end example
@c }}} @c }}}
@c {{{ dumpdir @c {{{ dumpdir
@ -1644,7 +1644,7 @@ This is useful when maintaining configuration on multiple hosts to
keep the differences in a separate file. keep the differences in a separate file.
@example @example
include /etc/chrony/local.conf include @SYSCONFDIR@/chrony/local.conf
@end example @end example
@c }}} @c }}}
@c {{{ initstepslew @c {{{ initstepslew
@ -1719,7 +1719,7 @@ ID/key pairs for the following 2 uses:
The format of the command is shown in the example below The format of the command is shown in the example below
@example @example
keyfile /etc/chrony.keys keyfile @SYSCONFDIR@/chrony.keys
@end example @end example
The argument is simply the name of the file containing the ID/key The argument is simply the name of the file containing the ID/key
@ -2580,7 +2580,7 @@ of the system's real-time clock (RTC).
The syntax is illustrated in the following example The syntax is illustrated in the following example
@example @example
rtcfile /etc/chrony.rtc rtcfile @SYSCONFDIR@/chrony.rtc
@end example @end example
@code{chronyd} saves information in this file when it exits and when the @code{chronyd} saves information in this file when it exits and when the
@ -2951,7 +2951,7 @@ With this option multiple commands can be specified on the command line.
Each argument will be interpreted as a whole command. Each argument will be interpreted as a whole command.
@item -f <conf-file> @item -f <conf-file>
This option can be used to specify an alternate location of the @code{chronyd} This option can be used to specify an alternate location of the @code{chronyd}
configuration file (default @file{/etc/chrony.conf}). The configuration file is configuration file (default @file{@SYSCONFDIR@/chrony.conf}). The configuration file is
needed for the `-a' option. needed for the `-a' option.
@item -a @item -a
With this option @code{chronyc} will try to authenticate automatically on With this option @code{chronyc} will try to authenticate automatically on
@ -2967,7 +2967,7 @@ power to reconfigure the run-time behaviour of @code{chronyd}. Consequently,
@code{chronyc} is quite dangerous for the integrity of the target @code{chronyc} is quite dangerous for the integrity of the target
system's clock performance. Having access to @code{chronyd} via chronyc is system's clock performance. Having access to @code{chronyd} via chronyc is
more or less equivalent to being able to modify @code{chronyd's} configuration more or less equivalent to being able to modify @code{chronyd's} configuration
file (typically @file{/etc/chrony.conf}) and to restart @code{chronyd}. file (typically @file{@SYSCONFDIR@/chrony.conf}) and to restart @code{chronyd}.
Chronyc also provides a number of monitoring (as opposed to commanding) Chronyc also provides a number of monitoring (as opposed to commanding)
commands, which will not affect the behaviour of @code{chronyd}. However, you commands, which will not affect the behaviour of @code{chronyd}. However, you
@ -4210,7 +4210,7 @@ the computer is currently synchronised. If this is @code{127.127.1.1}
it means the computer is not synchronised to any external source and it means the computer is not synchronised to any external source and
that you have the `local' mode operating (via the @code{local} command that you have the `local' mode operating (via the @code{local} command
in @code{chronyc} (@pxref{local command}), or the @code{local} directive in @code{chronyc} (@pxref{local command}), or the @code{local} directive
in the @file{/etc/chrony.conf} file (@pxref{local directive})). in the @file{@SYSCONFDIR@/chrony.conf} file (@pxref{local directive})).
@item Stratum @item Stratum
The stratum indicates how many hops away from a computer with an The stratum indicates how many hops away from a computer with an

View file

@ -44,7 +44,7 @@ will be interpreted as a whole command.
.TP .TP
\fB\-f\fR \fIconf-file\fR \fB\-f\fR \fIconf-file\fR
This option can be used to specify an alternate location for the This option can be used to specify an alternate location for the
configuration file (default \fI/etc/chrony.conf\fR). The configuration file is configuration file (default \fI@SYSCONFDIR@/chrony.conf\fR). The configuration file is
needed for the \fB-a\fR option. needed for the \fB-a\fR option.
.TP .TP
\fB\-a\fR \fB\-a\fR

View file

@ -24,10 +24,10 @@ gains or loses time, and compensates for this.
privileges. privileges.
If \fBchronyd\fR has been installed to its default location If \fBchronyd\fR has been installed to its default location
\fI/usr/local/sbin/chronyd\fR, starting it is simply a matter of entering the \fI@SBINDIR@/chronyd\fR, starting it is simply a matter of entering the
command: command:
\fI/usr/local/sbin/chronyd\fR \fI@SBINDIR@/chronyd\fR
Information messages and warnings will be logged to syslog. Information messages and warnings will be logged to syslog.
@ -56,7 +56,7 @@ to syslog.
.TP .TP
\fB\-f\fR \fIconf-file\fR \fB\-f\fR \fIconf-file\fR
This option can be used to specify an alternate location for the This option can be used to specify an alternate location for the
configuration file (default \fI/etc/chrony.conf\fR). configuration file (default \fI@SYSCONFDIR@/chrony.conf\fR).
.TP .TP
.B \-r .B \-r
This option will reload sample histories for each of the servers being used. This option will reload sample histories for each of the servers being used.
@ -112,7 +112,7 @@ Resolve hostnames only to IPv4 addresses.
Resolve hostnames only to IPv6 addresses. Resolve hostnames only to IPv6 addresses.
.SH FILES .SH FILES
\fI/etc/chrony.conf\fR \fI@SYSCONFDIR@/chrony.conf\fR
.SH BUGS .SH BUGS
To report bugs, please visit \fIhttp://chrony.tuxfamily.org/\fR To report bugs, please visit \fIhttp://chrony.tuxfamily.org/\fR

44
configure vendored
View file

@ -585,26 +585,30 @@ else
add_def CHRONY_VERSION "\"DEVELOPMENT\"" add_def CHRONY_VERSION "\"DEVELOPMENT\""
fi fi
sed -e "s%@EXTRA_OBJECTS@%${EXTRA_OBJECTS}%;\ for f in Makefile chrony.conf.5 chrony.texi chronyc.1 chronyd.8
s%@CC@%${MYCC}%;\ do
s%@CFLAGS@%${MYCFLAGS}%;\ echo Creating $f
s%@CPPFLAGS@%${CPPFLAGS}%;\ sed -e "s%@EXTRA_OBJECTS@%${EXTRA_OBJECTS}%;\
s%@LIBS@%${LIBS}%;\ s%@CC@%${MYCC}%;\
s%@LDFLAGS@%${MYLDFLAGS}%;\ s%@CFLAGS@%${MYCFLAGS}%;\
s%@EXTRA_LIBS@%${EXTRA_LIBS}%;\ s%@CPPFLAGS@%${CPPFLAGS}%;\
s%@EXTRA_CLI_LIBS@%${EXTRA_CLI_LIBS}%;\ s%@LIBS@%${LIBS}%;\
s%@READLINE_COMPILE@%${READLINE_COMPILE}%;\ s%@LDFLAGS@%${MYLDFLAGS}%;\
s%@READLINE_LINK@%${READLINE_LINK}%;\ s%@EXTRA_LIBS@%${EXTRA_LIBS}%;\
s%@HASH_OBJ@%${HASH_OBJ}%;\ s%@EXTRA_CLI_LIBS@%${EXTRA_CLI_LIBS}%;\
s%@HASH_LINK@%${HASH_LINK}%;\ s%@READLINE_COMPILE@%${READLINE_COMPILE}%;\
s%@HASH_COMPILE@%${HASH_COMPILE}%;\ s%@READLINE_LINK@%${READLINE_LINK}%;\
s%@SYSCONFDIR@%${SYSCONFDIR}%;\ s%@HASH_OBJ@%${HASH_OBJ}%;\
s%@BINDIR@%${BINDIR}%;\ s%@HASH_LINK@%${HASH_LINK}%;\
s%@SBINDIR@%${SBINDIR}%;\ s%@HASH_COMPILE@%${HASH_COMPILE}%;\
s%@DOCDIR@%${DOCDIR}%;\ s%@SYSCONFDIR@%${SYSCONFDIR}%;\
s%@MANDIR@%${MANDIR}%;\ s%@BINDIR@%${BINDIR}%;\
s%@INFODIR@%${INFODIR}%;"\ s%@SBINDIR@%${SBINDIR}%;\
< Makefile.in > Makefile s%@DOCDIR@%${DOCDIR}%;\
s%@MANDIR@%${MANDIR}%;\
s%@INFODIR@%${INFODIR}%;"\
< ${f}.in > $f
done
# ======================================================================= # =======================================================================
# vim:et:sw=2:ht=2:sts=2:fdm=marker:cms=#%s # vim:et:sw=2:ht=2:sts=2:fdm=marker:cms=#%s

View file

@ -34,13 +34,16 @@ echo $version > version.txt
sed -e "s%@@VERSION@@%${version}%" < chrony.spec.sample > chrony.spec sed -e "s%@@VERSION@@%${version}%" < chrony.spec.sample > chrony.spec
for m in chrony.1 chronyc.1 chrony.conf.5 chronyd.8; do for m in chrony.1.in chronyc.1.in chrony.conf.5.in chronyd.8.in; do
sed -e "s%@VERSION@%${version}%;s%@MAN_DATE@%${mandate}%" \ sed -e "s%@VERSION@%${version}%;s%@MAN_DATE@%${mandate}%" \
< $m > ${m}_ < $m > ${m}_
mv -f ${m}_ $m mv -f ${m}_ $m
done done
makeinfo --no-headers --number-sections -o chrony.txt chrony.texi ./configure && make chrony.txt || exit 1
mv chrony.txt chrony.txt_
make distclean
mv chrony.txt_ chrony.txt
rm -f make_release chrony.spec.sample .gitignore rm -f make_release chrony.spec.sample .gitignore