Remove unused stuff from doc/.

Let configure update pathnames in documentation.
This commit is contained in:
Guus Sliepen 2003-08-08 14:07:12 +00:00
parent 070aee3be1
commit 0c2256670f
11 changed files with 77 additions and 6006 deletions

View file

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $Id: configure.in,v 1.13.2.80 2003/08/02 16:05:33 guus Exp $ dnl $Id: configure.in,v 1.13.2.81 2003/08/08 14:07:11 guus Exp $
AC_PREREQ(2.57) AC_PREREQ(2.57)
AC_INIT(src/tincd.c) AC_INIT(src/tincd.c)
@ -296,10 +296,6 @@ AC_ARG_ENABLE(tracing,
AC_SUBST(INCLUDES) AC_SUBST(INCLUDES)
AC_OUTPUT(Makefile AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile doc/tincd.8 doc/tinc.conf.5 doc/tincinclude.texi lib/Makefile po/Makefile.in m4/Makefile])
src/Makefile
doc/Makefile AC_OUTPUT
lib/Makefile
po/Makefile.in
m4/Makefile
)

View file

@ -1,23 +0,0 @@
# Having a separate GNUmakefile lets me use features of GNU make
# to generate the man pages.
# This makefile is used only if you run GNU Make.
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
have-Makefile := $(shell test -f Makefile && echo yes)
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
ifeq ($(have-Makefile),yes)
include Makefile
include $(srcdir)/Makefile.maint
else
all:
@echo There seems to be no Makefile in this directory.
@echo "You must run ./configure before running \`make'."
@exit 1
endif

View file

@ -2,17 +2,11 @@
info_TEXINFOS = tinc.texi info_TEXINFOS = tinc.texi
dyn_MANS = man_MANS = tincd.8 tinc.conf.5
man_aux = $(dyn_MANS:.8=.x)
man_MANS = tincd.8 tinc.conf.5 $(dyn_MANS) EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.conf.5.in sample-config.tar.gz
PERL = @PERL@ CLEANFILES = *.html
HELP2MAN = help2man
MAINTAINERCLEANFILES = $(dyn_MANS)
EXTRA_DIST = $(man_MANS) $(HELP2MAN) $(man_aux) \
Makefile.maint GNUmakefile Makefile.summ sample-config.tar.gz
# Use `ginstall' in the definition of man_MANS to avoid # Use `ginstall' in the definition of man_MANS to avoid
# confusion with the `install' target. The install rule transforms `ginstall' # confusion with the `install' target. The install rule transforms `ginstall'
@ -22,13 +16,8 @@ transform = s/ginstall/install/; @program_transform_name@
# For additional rules usually of interest only to the maintainer, # For additional rules usually of interest only to the maintainer,
# see GNUmakefile and Makefile.maint. # see GNUmakefile and Makefile.maint.
tinc.pdf: tinc.texi
texi2pdf -o tinc.pdf tinc.texi
texi2html: tinc.texi texi2html: tinc.texi
mkdir -p html texi2html -split=chapter tinc.texi
rm -f html/*.html
cd html && texi2html -split=chapter ../tinc.texi
%.html: % %.html: $(man_MANS)
w3mman2html $< > $@ w3mman2html $< > $@

View file

@ -1,38 +0,0 @@
# This -*- Makefile -*- uses features of GNU make.
# It is included via GNUmakefile.
# The following one line summaries were extracted from the
# original man pages using this bit of sh code:
# for i in *.1; do echo "$i: "|tr -d '\012'; \
# grep -A1 SH.NAME $i|sed '/SH NAME/d;s/^[^ ][^ ]* .- //'; done
include Makefile.summ
HELP2MAN-run = $(PERL) -w -- $(srcdir)/$(HELP2MAN)
# Depend on configure.in to get version number changes.
$(dyn_MANS): $(top_srcdir)/configure.in
# Depend on the source file containing the --help text.
# Filter out irregular cases.
regular-men = $(filter-out $(irregular-men),$(dyn_MANS))
$(regular-men): %.8: $(top_srcdir)/src/%.c
executable = $(patsubst %/install,%/ginstall, ../src/$(basename $@))
$(dyn_MANS): %.8: %.x $(HELP2MAN)
@if test -f $(executable); then \
echo "Updating man page $@"; \
rm -f $@-t $@; \
$(HELP2MAN-run) \
--name="$($(basename $@)-summary)" \
--include=$(basename $@).x \
$(executable) > $@-t; \
chmod -w $@-t; \
mv $@-t $@; \
else \
echo "WARNING: The man page $@ cannot be updated yet."; \
echo " Retry once the corresponding executable is built."; \
fi
sample-config.tar.gz:
GZIP=$(GZIP_ENV) $(AMTAR) chozf sample-config.tar.gz sample-config

View file

@ -1,2 +0,0 @@
# -*- makefile -*-
tincd-summary = tinc VPN daemon

View file

@ -1,375 +0,0 @@
#!/usr/bin/perl -w
# Generate a short man page from --help and --version output.
# Copyright © 1997, 98 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Written by Brendan O'Dea <bod@compusol.com.au>
use 5.004;
use strict;
use Getopt::Long;
use POSIX qw(strftime setlocale LC_TIME);
my $this_program = 'help2man';
my $this_version = '1.006';
my $version_info = <<EOT;
$this_program $this_version
Copyright (C) 1997, 98 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Brendan O'Dea <bod\@compusol.com.au>
EOT
my $help_info = <<EOT;
`$this_program' generates a man page out of `--help' and `--version' output.
Usage: $this_program [OPTION]... EXECUTABLE
--name=STRING use `STRING' as the description for the NAME paragraph
--include=FILE include material from `FILE'
--opt-include=FILE include material from `FILE' if it exists
--output=FILE send output to `FILE'
--no-info suppress pointer to Texinfo manual
--help print this help, then exit
--version print $this_program program version number, then exit
EXECUTABLE should accept `--help' and `version' options.
EOT
my ($include, $opt_name, $opt_include, $opt_output, $opt_no_info);
# Parse options.
GetOptions (
'name=s' => \$opt_name,
'include=s' => \$include,
'opt-include=s' => \$opt_include,
'output=s' => \$opt_output,
'no-info' => \$opt_no_info,
help => sub { print $help_info; exit },
version => sub { print $version_info; exit },
) or die $help_info;
die $help_info unless @ARGV == 1;
my %include = ();
my @include = (); # to retain order
# Process include file (if given). Format is:
#
# [section name]
# verbatim text
if ($include or $opt_include)
{
if (open INC, $include || $opt_include)
{
my $sect;
while (<INC>)
{
if (/^\[([^]]+)\]/)
{
$sect = uc $1;
$sect =~ s/^\s+//;
$sect =~ s/\s+$//;
next;
}
# Silently ignore anything before the first
# section--allows for comments and revision info.
next unless $sect;
push @include, $sect unless $include{$sect};
$include{$sect} ||= '';
$include{$sect} .= $_;
}
close INC;
die "$this_program: no valid information found in `$include'\n"
unless %include;
# Compress trailing blank lines.
for (keys %include)
{
$include{$_} =~ s/\n+$//;
$include{$_} .= "\n" unless /^NAME$/;
}
}
else
{
die "$this_program: can't open `$include' ($!)\n" if $include;
}
}
# Turn off localisation of executable's ouput.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
# Turn off localisation of date (for strftime)
setlocale LC_TIME, 'C';
# Grab help and version paragraphs from executable
my @help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
or die "$this_program: can't get `--help' info from $ARGV[0]\n";
my @version = split /\n\n+/, `$ARGV[0] --version 2>/dev/null`
or die "$this_program: can't get `--version' info from $ARGV[0]\n";
my $date = strftime "%B %Y", localtime;
my $program = $ARGV[0]; $program =~ s!.*/!!;
my $package = $program;
my $version;
if ($opt_output)
{
unlink $opt_output
or die "$this_program: can't unlink $opt_output ($!)\n"
if -e $opt_output;
open STDOUT, ">$opt_output"
or die "$this_program: can't create $opt_output ($!)\n";
}
# The first line of the --version information is assumed to be in one
# of the following formats:
#
# <version>
# <program> <version>
# GNU <program> <version>
# <program> (GNU <package>) <version>
# <program> - GNU <package> <version>
#
# and seperated from any copyright/author details by a blank line.
$_ = shift @version;
if (/^(\S+)\s+\((GNU\s+[^)]+)\)\s+(.*)/ or
/^(\S+)\s+-\s*(GNU\s+\S+)\s+(.*)/)
{
$program = $1;
$package = $2;
$version = $3;
}
elsif (/^(GNU\s+)?(\S+)\s+(.*)/)
{
$program = $2;
$package = $1 ? "$1$2" : $2;
$version = $3;
}
else
{
$version = $_;
}
$program =~ s!.*/!!;
# no info for `info' itself
$opt_no_info = 1 if $program eq 'info';
# --name overrides --include contents
$include{NAME} = "$program \\- $opt_name" if $opt_name;
# Default (useless) NAME paragraph
$include{NAME} ||= "$program \\- manual page for $program $version";
# Man pages traditionally have the page title in caps.
my $PROGRAM = uc $program;
# Header.
print <<EOT;
.\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
.TH $PROGRAM 1 "$date" "$package $version" "FSF"
.SH NAME
$include{NAME}
EOT
my $accumulate = 1;
my @description = ();
sub convert_option;
# Output converted --help information.
for (@help)
{
chomp;
if (s/^Usage:\s+\S+\s+(.*)\n?//)
{
# Turn the usage clause into a synopsis.
my $synopsis = '';
do {
my $syn = $1;
$syn =~ s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
$syn =~ s/^/\\fI/ unless $syn =~ s/^\\fR//;
$syn .= '\fR';
$syn =~ s/\\fI(\s*)\\fR/$1/g;
$synopsis .= ".br\n" unless $accumulate;
$synopsis .= ".B $program\n";
$synopsis .= "$syn\n";
$accumulate = 0;
} while s/^(?:Usage|\s*or):\s+\S+\s+(.*)\n?//;
# Include file overrides SYNOPSIS.
print ".SH SYNOPSIS\n", $include{SYNOPSIS} || $synopsis;
# Dump any accumulated description text.
print ".SH DESCRIPTION\n";
print @description;
# Add additional description text from include file.
if ($include{DESCRIPTION})
{
print ".PP\n" unless $include{DESCRIPTION} =~ /^\..P/;
print $include{DESCRIPTION};
}
next unless $_;
}
# Accumulate text if the synopsis has not been produced yet.
if ($accumulate)
{
push @description, ".PP\n" if @description;
push @description, "$_\n";
next;
}
# Catch start of options.
if (/^Options:/)
{
print qq(.SH OPTIONS\n);
s/Options://;
}
# Catch bug report text.
if (/^Report bugs |^Email bug reports to /)
{
print qq(.SH "REPORTING BUGS"\n$_\n);
next;
}
# Special case for tar 1.12: --label=NAME\nPATTERN.
s{(\n[ \t]*)(-V,[ \t]+--label=NAME.*)\n[ \t]+PATTERN[ \t]+}
{$1$2$1\\&...=PATTERN };
# Convert options.
s/(\s)(-[][\w=-]+|\\&\S+)/$1 . convert_option $2/ge;
# Option subsections have second line indented.
print qq(.SS "$1"\n) if s/^(\S.*)\n(\s)/$2/;
# Lines indented more than about 10 spaces may be assumed to be
# continuations of the previous line.
s/\n {10,}/ /g;
# Lines following dotted (*) or numbered points may also be
# continued if indented to the same level as the text following
# the point.
1 while s{((?:^|\n)(\s+)(?:[1-9][.)]|\*)(\s+)(?:[^\n]+))\n\2 \3(\S)}
{$1 $4}g;
# Indented paragraph.
if (/^\s/)
{
for (split /\n/)
{
s/^\s+//;
s/([^,])\s+/$1\n/;
print ".TP\n$_\n" if $_;
}
}
# Anything else.
else
{
print ".PP\n$_\n";
}
}
# Print any include items other than the ones we have already dealt
# with.
for (@include)
{
print qq(.SH "$_"\n$include{$_})
unless /^(NAME|SYNOPSIS|DESCRIPTION|SEE ALSO)$/;
}
# Refer to the real documentation.
if ($include{'SEE ALSO'} or !$opt_no_info)
{
print qq(.SH "SEE ALSO"\n);
print $include{'SEE ALSO'}, ".PP\n" if $include{'SEE ALSO'};
print <<EOT unless $opt_no_info;
The full documentation for
.B $program
is maintained as a Texinfo manual. If the
.B info
and
.B $program
programs are properly installed at your site, the command
.IP
.B info $program
.PP
should give you access to the complete manual.
EOT
}
# Output converted --version information.
for (@version)
{
chomp;
# Join hyphenated lines.
s/([A-Za-z])-\n */$1/g;
# Convert copyright symbol or (c) to nroff character.
s/Copyright\s+(?:\xa9|\([Cc]\))/Copyright \\(co/g;
# Insert appropriate headings for copyright and author.
if (/^Copyright\s\\/) { print ".SH COPYRIGHT\n" }
elsif (/^Written\s+by/) { print ".SH AUTHOR\n" }
else { print ".PP\n"; }
# Insert line breaks before additional copyright messages and the
# disclaimer.
s/(.)\n(Copyright\s|This is free software)/$1\n.br\n$2/g;
print "$_\n";
}
exit;
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
# embolden. Option arguments get italicised.
sub convert_option
{
my $option = '\fB' . shift;
$option =~ s/-/\\-/g;
unless ($option =~ s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
{
$option =~ s/=(.)/\\fR=\\fI$1/;
$option =~ s/ (.)/ \\fI$1/;
$option .= '\fR';
}
$option;
}

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@
.Nd tinc daemon configuration .Nd tinc daemon configuration
.Sh DESCRIPTION .Sh DESCRIPTION
The files in the The files in the
.Pa /etc/tinc/ .Pa @sysconfdir@/tinc/
directory contain runtime and security information for the tinc daemon. directory contain runtime and security information for the tinc daemon.
.Sh NETWORKS .Sh NETWORKS
It is perfectly ok for you to run more than one tinc daemon. It is perfectly ok for you to run more than one tinc daemon.
@ -25,7 +25,7 @@ with the
option, which will assign a name to this daemon. option, which will assign a name to this daemon.
.Pp .Pp
The effect of this is that the daemon will set its configuration root to The effect of this is that the daemon will set its configuration root to
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa / , .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / ,
where where
.Ar NETNAME .Ar NETNAME
is your argument to the is your argument to the
@ -41,13 +41,13 @@ In this case, the network name would just be empty,
and it will be used as such. and it will be used as such.
.Nm tinc .Nm tinc
now looks for files in now looks for files in
.Pa /etc/tinc/ , .Pa @sysconfdir@/tinc/ ,
instead of instead of
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa / ; .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / ;
the configuration file should be the configuration file should be
.Pa /etc/tinc/tinc.conf , .Pa @sysconfdir@/tinc/tinc.conf ,
and the host configuration files are now expected to be in and the host configuration files are now expected to be in
.Pa /etc/tinc/hosts/ . .Pa @sysconfdir@/tinc/hosts/ .
.Pp .Pp
But it is highly recommended that you use this feature of But it is highly recommended that you use this feature of
.Nm tinc , .Nm tinc ,
@ -57,7 +57,7 @@ Hence, we will assume that you use it.
Each tinc daemon should have a name that is unique in the network which it will be part of. Each tinc daemon should have a name that is unique in the network which it will be part of.
The name will be used by other tinc daemons for identification. The name will be used by other tinc daemons for identification.
The name has to be declared in the The name has to be declared in the
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
file. file.
.Pp .Pp
To make things easy, To make things easy,
@ -69,21 +69,21 @@ You should use
to generate public/private keypairs. to generate public/private keypairs.
It will generate two keys. It will generate two keys.
The private key should be stored in a separate file The private key should be stored in a separate file
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv
\-\- where \-\- where
.Ar NETNAME .Ar NETNAME
stands for the network (see stands for the network (see
.Sx NETWORKS ) .Sx NETWORKS )
above. above.
The public key should be stored in the host configuration file The public key should be stored in the host configuration file
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Va NAME .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Va NAME
\-\- where \-\- where
.Va NAME .Va NAME
stands for the name of the local tinc daemon (see stands for the name of the local tinc daemon (see
.Sx NAMES ) . .Sx NAMES ) .
.Sh SERVER CONFIGURATION .Sh SERVER CONFIGURATION
The server configuration of the daemon is done in the file The server configuration of the daemon is done in the file
.Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf . .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .
This file consists of comments (lines started with a This file consists of comments (lines started with a
.Li # ) .Li # )
or assignments in the form of: or assignments in the form of:
@ -306,14 +306,14 @@ Setting this options also implicitly sets IndirectData.
.El .El
.Sh FILES .Sh FILES
.Bl -tag -width indent .Bl -tag -width indent
.It Pa /etc/tinc/ .It Pa @sysconfdir@/tinc/
The top directory for configuration files. The top directory for configuration files.
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
The default name of the server configuration file for net The default name of the server configuration file for net
.Ar NETNAME . .Ar NETNAME .
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/ .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
Host configuration files are kept in this directory. Host configuration files are kept in this directory.
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc-up .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
If an executable file with this name exists, If an executable file with this name exists,
it will be executed right after the tinc daemon has connected to the virtual network device. it will be executed right after the tinc daemon has connected to the virtual network device.
It can be used to set up the corresponding network interface. It can be used to set up the corresponding network interface.
@ -328,7 +328,7 @@ or if the virtual network device is a Linux tun/tap device,
the environment variable the environment variable
.Ev $INTERFACE .Ev $INTERFACE
will be set to the name of the network interface. will be set to the name of the network interface.
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc-down .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
If an executable file with this name exists, If an executable file with this name exists,
it will be executed right before the tinc daemon is going to close it will be executed right before the tinc daemon is going to close
its connection to the virtual network device. its connection to the virtual network device.

View file

@ -1,24 +1,26 @@
\input texinfo @c -*-texinfo-*- \input texinfo @c -*-texinfo-*-
@c $Id: tinc.texi,v 1.8.4.42 2003/08/02 22:01:50 guus Exp $ @c $Id: tinc.texi,v 1.8.4.43 2003/08/08 14:07:12 guus Exp $
@c %**start of header @c %**start of header
@setfilename tinc.info @setfilename tinc.info
@settitle tinc Manual @settitle tinc Manual
@setchapternewpage odd @setchapternewpage odd
@c %**end of header @c %**end of header
@include tincinclude.texi
@ifinfo @ifinfo
@dircategory Networking tools @dircategory Networking tools
@direntry @direntry
* tinc: (tinc). The tinc Manual. * tinc: (tinc). The tinc Manual.
@end direntry @end direntry
This is the info manual for tinc, a Virtual Private Network daemon. This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon.
Copyright @copyright{} 1998-2003 Ivo Timmermans Copyright @copyright{} 1998-2003 Ivo Timmermans
<ivo@@o2w.nl>, Guus Sliepen <guus@@sliepen.eu.org> and <ivo@@o2w.nl>, Guus Sliepen <guus@@sliepen.eu.org> and
Wessel Dankers <wsl@@nl.linux.org>. Wessel Dankers <wsl@@nl.linux.org>.
$Id: tinc.texi,v 1.8.4.42 2003/08/02 22:01:50 guus Exp $ $Id: tinc.texi,v 1.8.4.43 2003/08/08 14:07:12 guus Exp $
Permission is granted to make and distribute verbatim copies of this Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are manual provided the copyright notice and this permission notice are
@ -39,11 +41,13 @@ permission notice identical to this one.
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
@cindex copyright @cindex copyright
This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon.
Copyright @copyright{} 1998-2003 Ivo Timmermans Copyright @copyright{} 1998-2003 Ivo Timmermans
<ivo@@o2w.nl>, Guus Sliepen <guus@@sliepen.eu.org> and <ivo@@o2w.nl>, Guus Sliepen <guus@@sliepen.eu.org> and
Wessel Dankers <wsl@@nl.linux.org>. Wessel Dankers <wsl@@nl.linux.org>.
$Id: tinc.texi,v 1.8.4.42 2003/08/02 22:01:50 guus Exp $ $Id: tinc.texi,v 1.8.4.43 2003/08/08 14:07:12 guus Exp $
Permission is granted to make and distribute verbatim copies of this Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are manual provided the copyright notice and this permission notice are
@ -830,14 +834,14 @@ This means that you call tincd with the -n argument,
which will assign a netname to this daemon. which will assign a netname to this daemon.
The effect of this is that the daemon will set its configuration The effect of this is that the daemon will set its configuration
``root'' to /etc/tinc/netname/, where netname is your argument to the -n ``root'' to @value{sysconfdir}/tinc/@emph{netname}/, where @emph{netname} is your argument to the -n
option. You'll notice that it appears in syslog as ``tinc.netname''. option. You'll notice that it appears in syslog as ``tinc.@emph{netname}''.
However, it is not strictly necessary that you call tinc with the -n However, it is not strictly necessary that you call tinc with the -n
option. In this case, the network name would just be empty, and it will option. In this case, the network name would just be empty, and it will
be used as such. tinc now looks for files in /etc/tinc/, instead of be used as such. tinc now looks for files in @value{sysconfdir}/tinc/, instead of
/etc/tinc/netname/; the configuration file should be /etc/tinc/tinc.conf, @value{sysconfdir}/tinc/@emph{netname}/; the configuration file should be @value{sysconfdir}/tinc/tinc.conf,
and the host configuration files are now expected to be in /etc/tinc/hosts/. and the host configuration files are now expected to be in @value{sysconfdir}/tinc/hosts/.
But it is highly recommended that you use this feature of tinc, because But it is highly recommended that you use this feature of tinc, because
it will be so much clearer whom your daemon talks to. Hence, we will it will be so much clearer whom your daemon talks to. Hence, we will
@ -874,8 +878,8 @@ It does not matter if two tinc daemons have a `ConnectTo' value pointing to each
@section Configuration files @section Configuration files
The actual configuration of the daemon is done in the file The actual configuration of the daemon is done in the file
@file{/etc/tinc/netname/tinc.conf} and at least one other file in the directory @file{@value{sysconfdir}/tinc/@emph{netname}/tinc.conf} and at least one other file in the directory
@file{/etc/tinc/netname/hosts/}. @file{@value{sysconfdir}/tinc/@emph{netname}/hosts/}.
These file consists of comments (lines started with a #) or assignments These file consists of comments (lines started with a #) or assignments
in the form of in the form of
@ -1144,13 +1148,13 @@ Setting this options also implicitly sets IndirectData.
@subsubheading Step 1. Creating the main configuration file @subsubheading Step 1. Creating the main configuration file
The main configuration file will be called @file{/etc/tinc/netname/tinc.conf}. The main configuration file will be called @file{@value{sysconfdir}/tinc/@emph{netname}/tinc.conf}.
Adapt the following example to create a basic configuration file: Adapt the following example to create a basic configuration file:
@example @example
Name = @emph{yourname} Name = @emph{yourname}
Device = @emph{/dev/tap0} Device = @emph{/dev/tap0}
PrivateKeyFile = /etc/tinc/@emph{netname}/rsa_key.priv PrivateKeyFile = @value{sysconfdir}/tinc/@emph{netname}/rsa_key.priv
@end example @end example
Then, if you know to which other tinc daemon(s) yours is going to connect, Then, if you know to which other tinc daemon(s) yours is going to connect,
@ -1159,7 +1163,7 @@ add `ConnectTo' values.
@subsubheading Step 2. Creating your host configuration file @subsubheading Step 2. Creating your host configuration file
If you added a line containing `Name = yourname' in the main configuarion file, If you added a line containing `Name = yourname' in the main configuarion file,
you will need to create a host configuration file @file{/etc/tinc/netname/hosts/yourname}. you will need to create a host configuration file @file{@value{sysconfdir}/tinc/@emph{netname}/hosts/yourname}.
Adapt the following example to create a host configuration file: Adapt the following example to create a host configuration file:
@example @example
@ -1205,9 +1209,9 @@ if you are using the Linux tun/tap driver, the network interface will by default
@cindex tinc-up @cindex tinc-up
You can configure the network interface by putting ordinary ifconfig, route, and other commands You can configure the network interface by putting ordinary ifconfig, route, and other commands
to a script named @file{/etc/tinc/netname/tinc-up}. When tinc starts, this script to a script named @file{@value{sysconfdir}/tinc/@emph{netname}/tinc-up}. When tinc starts, this script
will be executed. When tinc exits, it will execute the script named will be executed. When tinc exits, it will execute the script named
@file{/etc/tinc/netname/tinc-down}, but normally you don't need to create that script. @file{@value{sysconfdir}/tinc/@emph{netname}/tinc-down}, but normally you don't need to create that script.
An example @file{tinc-up} script: An example @file{tinc-up} script:
@ -1262,7 +1266,7 @@ for this particular VPN.
@emph{BranchA} would be configured like this: @emph{BranchA} would be configured like this:
In @file{/etc/tinc/company/tinc-up}: In @file{@value{sysconfdir}/tinc/company/tinc-up}:
@example @example
# Real interface of internal network: # Real interface of internal network:
@ -1271,15 +1275,15 @@ In @file{/etc/tinc/company/tinc-up}:
ifconfig $INTERFACE 10.1.54.1 netmask 255.0.0.0 ifconfig $INTERFACE 10.1.54.1 netmask 255.0.0.0
@end example @end example
and in @file{/etc/tinc/company/tinc.conf}: and in @file{@value{sysconfdir}/tinc/company/tinc.conf}:
@example @example
Name = BranchA Name = BranchA
PrivateKeyFile = /etc/tinc/company/rsa_key.priv PrivateKeyFile = @value{sysconfdir}/tinc/company/rsa_key.priv
Device = /dev/tap0 Device = /dev/tap0
@end example @end example
On all hosts, /etc/tinc/company/hosts/BranchA contains: On all hosts, @value{sysconfdir}/tinc/company/hosts/BranchA contains:
@example @example
Subnet = 10.1.0.0/16 Subnet = 10.1.0.0/16
@ -1298,7 +1302,7 @@ since that will make things a lot easier to remember and set up.
@subsubheading For Branch B @subsubheading For Branch B
In @file{/etc/tinc/company/tinc-up}: In @file{@value{sysconfdir}/tinc/company/tinc-up}:
@example @example
# Real interface of internal network: # Real interface of internal network:
@ -1307,19 +1311,19 @@ In @file{/etc/tinc/company/tinc-up}:
ifconfig $INTERFACE 10.2.1.12 netmask 255.0.0.0 ifconfig $INTERFACE 10.2.1.12 netmask 255.0.0.0
@end example @end example
and in @file{/etc/tinc/company/tinc.conf}: and in @file{@value{sysconfdir}/tinc/company/tinc.conf}:
@example @example
Name = BranchB Name = BranchB
ConnectTo = BranchA ConnectTo = BranchA
PrivateKeyFile = /etc/tinc/company/rsa_key.priv PrivateKeyFile = @value{sysconfdir}/tinc/company/rsa_key.priv
@end example @end example
Note here that the internal address (on eth0) doesn't have to be the Note here that the internal address (on eth0) doesn't have to be the
same as on the tap0 device. Also, ConnectTo is given so that no-one can same as on the tap0 device. Also, ConnectTo is given so that no-one can
connect to this node. connect to this node.
On all hosts, in @file{/etc/tinc/company/hosts/BranchB}: On all hosts, in @file{@value{sysconfdir}/tinc/company/hosts/BranchB}:
@example @example
Subnet = 10.2.0.0/16 Subnet = 10.2.0.0/16
@ -1333,7 +1337,7 @@ Address = 2.3.4.5
@subsubheading For Branch C @subsubheading For Branch C
In @file{/etc/tinc/company/tinc-up}: In @file{@value{sysconfdir}/tinc/company/tinc-up}:
@example @example
# Real interface of internal network: # Real interface of internal network:
@ -1342,7 +1346,7 @@ In @file{/etc/tinc/company/tinc-up}:
ifconfig $INTERFACE 10.3.69.254 netmask 255.0.0.0 ifconfig $INTERFACE 10.3.69.254 netmask 255.0.0.0
@end example @end example
and in @file{/etc/tinc/company/tinc.conf}: and in @file{@value{sysconfdir}/tinc/company/tinc.conf}:
@example @example
Name = BranchC Name = BranchC
@ -1354,7 +1358,7 @@ C already has another daemon that runs on port 655, so they have to
reserve another port for tinc. It knows the portnumber it has to listen on reserve another port for tinc. It knows the portnumber it has to listen on
from it's own host configuration file. from it's own host configuration file.
On all hosts, in @file{/etc/tinc/company/hosts/BranchC}: On all hosts, in @file{@value{sysconfdir}/tinc/company/hosts/BranchC}:
@example @example
Address = 3.4.5.6 Address = 3.4.5.6
@ -1369,7 +1373,7 @@ Port = 2000
@subsubheading For Branch D @subsubheading For Branch D
In @file{/etc/tinc/company/tinc-up}: In @file{@value{sysconfdir}/tinc/company/tinc-up}:
@example @example
# Real interface of internal network: # Real interface of internal network:
@ -1378,13 +1382,13 @@ In @file{/etc/tinc/company/tinc-up}:
ifconfig $INTERFACE 10.4.3.32 netmask 255.0.0.0 ifconfig $INTERFACE 10.4.3.32 netmask 255.0.0.0
@end example @end example
and in @file{/etc/tinc/company/tinc.conf}: and in @file{@value{sysconfdir}/tinc/company/tinc.conf}:
@example @example
Name = BranchD Name = BranchD
ConnectTo = BranchC ConnectTo = BranchC
Device = /dev/net/tun Device = /dev/net/tun
PrivateKeyFile = /etc/tinc/company/rsa_key.priv PrivateKeyFile = @value{sysconfdir}/tinc/company/rsa_key.priv
@end example @end example
D will be connecting to C, which has a tincd running for this network on D will be connecting to C, which has a tincd running for this network on
@ -1393,7 +1397,7 @@ Also note that since D uses the tun/tap driver, the network interface
will not be called `tun' or `tap0' or something like that, but will will not be called `tun' or `tap0' or something like that, but will
have the same name as netname. have the same name as netname.
On all hosts, in @file{/etc/tinc/company/hosts/BranchD}: On all hosts, in @file{@value{sysconfdir}/tinc/company/hosts/BranchD}:
@example @example
Subnet = 10.4.0.0/16 Subnet = 10.4.0.0/16
@ -1412,8 +1416,8 @@ A, B, C and D all have generated a public/private keypair with the following com
tincd -n company -K tincd -n company -K
@end example @end example
The private key is stored in @file{/etc/tinc/company/rsa_key.priv}, The private key is stored in @file{@value{sysconfdir}/tinc/company/rsa_key.priv},
the public key is put into the host configuration file in the @file{/etc/tinc/company/hosts/} directory. the public key is put into the host configuration file in the @file{@value{sysconfdir}/tinc/company/hosts/} directory.
During key generation, tinc automatically guesses the right filenames based on the -n option and During key generation, tinc automatically guesses the right filenames based on the -n option and
the Name directive in the @file{tinc.conf} file (if it is available). the Name directive in the @file{tinc.conf} file (if it is available).
@ -1460,7 +1464,7 @@ command line options.
@table @samp @table @samp
@item -c, --config=PATH @item -c, --config=PATH
Read configuration options from the directory PATH. The default is Read configuration options from the directory PATH. The default is
@file{/etc/tinc/netname/}. @file{@value{sysconfdir}/tinc/@emph{netname}/}.
@item -D, --no-detach @item -D, --no-detach
Don't fork and detach. Don't fork and detach.
@ -1492,10 +1496,10 @@ This will prevent sensitive data like shared private keys to be written to the s
@item --logfile[=FILE] @item --logfile[=FILE]
Write log entries to a file instead of to the system logging facility. Write log entries to a file instead of to the system logging facility.
If FILE is omitted, the default is /var/log/tinc.NETNAME.log. If FILE is omitted, the default is @value{localstatedir}/log/tinc.NETNAME.log.
@item --pidfile=FILE @item --pidfile=FILE
Write PID to FILE instead of /var/run/tinc.NETNAME.pid. Write PID to FILE instead of @value{localstatedir}/run/tinc.NETNAME.pid.
@item --bypass-security @item --bypass-security
Disables encryption and authentication. Disables encryption and authentication.

View file

@ -72,12 +72,12 @@ Write log entries to a file instead of to the system logging facility.
If If
.Ar FILE .Ar FILE
is omitted, the default is is omitted, the default is
.Pa /var/log/tinc. Ns Ar NETNAME Ns Pa .log. .Pa @localstatedir@/log/tinc. Ns Ar NETNAME Ns Pa .log.
.It Fl -pidfile Ns = Ns Ar FILE .It Fl -pidfile Ns = Ns Ar FILE
Write PID to Write PID to
.Ar FILE .Ar FILE
instead of instead of
.Pa /var/run/tinc. Ns Ar NETNAME Ns Pa .pid. .Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
.It Fl -bypass-security .It Fl -bypass-security
Disables encryption and authentication of the meta protocol. Disables encryption and authentication of the meta protocol.
Only useful for debugging. Only useful for debugging.
@ -141,29 +141,29 @@ This will log all network traffic over the virtual private network.
.El .El
.Sh FILES .Sh FILES
.Bl -tag -width indent .Bl -tag -width indent
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
The configuration file for The configuration file for
.Nm . .Nm .
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc-up .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
Script which is executed as soon as the virtual network device has been allocated. Script which is executed as soon as the virtual network device has been allocated.
Purpose is to further configure that device. Purpose is to further configure that device.
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /tinc-down .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
Script which is executed when Script which is executed when
.Nm .Nm
exits. exits.
Purpose is to cleanly shut down the virtual network device before it will be deallocated. Purpose is to cleanly shut down the virtual network device before it will be deallocated.
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/* .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/*
The directory containing the host configuration files The directory containing the host configuration files
used to authenticate other tinc daemons. used to authenticate other tinc daemons.
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar NAME Ns Pa -up .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar NAME Ns Pa -up
Script which is executed as soon as host Script which is executed as soon as host
.Ar NAME .Ar NAME
becomes reachable. becomes reachable.
.It Pa /etc/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar NAME Ns Pa -down .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar NAME Ns Pa -down
Script which is executed as soon as host Script which is executed as soon as host
.Ar NAME .Ar NAME
becomes unreachable. becomes unreachable.
.It Pa /var/run/tinc. Ns Ar NETNAME Ns Pa .pid .It Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid
The PID of the currently running The PID of the currently running
.Nm .Nm
is stored in this file. is stored in this file.

4
doc/tincinclude.texi.in Normal file
View file

@ -0,0 +1,4 @@
@set VERSION @VERSION@
@set PACKAGE @PACKAGE@
@set sysconfdir @sysconfdir@
@set localstatedir @localstatedir@