Import Debian changes 1.0.15-1
tinc (1.0.15-1) unstable; urgency=low
* New upstream release.
* Send SIGALRM to running tinc daemons whenever an interface is brought up
with the ifupdown framework. Based on a patch from Joachim Breitner.
Closes: #629880
* Allow tinc daemons to be started using ifupdown.
This commit is contained in:
commit
2ad1dc3fd7
66 changed files with 887 additions and 496 deletions
33
debian/README.Debian
vendored
33
debian/README.Debian
vendored
|
|
@ -7,4 +7,35 @@ to read it.
|
|||
The system startup script for tinc, /etc/init.d/tinc, uses the file
|
||||
/etc/tinc/nets.boot to find out which networks have to be started.
|
||||
|
||||
-- Ivo Timmermans <ivo@debian.org>, Wed, 31 May 2000, 19:56:05 +0200
|
||||
Alternatively, you can create a stanza in /etc/network/interfaces, and add a
|
||||
line with "tinc-net <netname>". This will cause a tincd to be started which
|
||||
uses the configuration from /etc/tinc/<netname>. You can use an inet static
|
||||
(with address and netmask options) or inet dhcp stanza, in which case the ifup
|
||||
will configure the VPN interface and you do not need to have a tinc-up script.
|
||||
|
||||
The following options are also recognized and map directly to the corresponding
|
||||
command line options for tincd:
|
||||
|
||||
tinc-config <directory>
|
||||
tinc-debug <level>
|
||||
tinc-mlock yes
|
||||
tinc-logfile <filename>
|
||||
tinc-chroot yes
|
||||
tinc-user <username>
|
||||
|
||||
An example stanza:
|
||||
|
||||
iface vpn inet static
|
||||
address 192.168.2.42
|
||||
netmask 255.255.0.0
|
||||
tinc-net myvpn
|
||||
tinc-debug 1
|
||||
tinc-mlock yes
|
||||
tinc-user nobody
|
||||
|
||||
This will start a tinc daemon that reads its configuration from
|
||||
/etc/tinc/myvpn, logs at debug level 1, locks itself in RAM, runs as user
|
||||
nobody, and creates a network interface called "vpn". Ifup then sets the
|
||||
address and netmask on that interface.
|
||||
|
||||
-- Guus Sliepen <guus@debian.org>, Fri, 24 June 2011, 18:10:53 +0200
|
||||
|
|
|
|||
10
debian/changelog
vendored
10
debian/changelog
vendored
|
|
@ -1,3 +1,13 @@
|
|||
tinc (1.0.15-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Send SIGALRM to running tinc daemons whenever an interface is brought up
|
||||
with the ifupdown framework. Based on a patch from Joachim Breitner.
|
||||
Closes: #629880
|
||||
* Allow tinc daemons to be started using ifupdown.
|
||||
|
||||
-- Guus Sliepen <guus@debian.org> Fri, 24 Jun 2011 18:21:51 +0200
|
||||
|
||||
tinc (1.0.14-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
|
|
|||
19
debian/tinc.if-post-down
vendored
Executable file
19
debian/tinc.if-post-down
vendored
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$IF_TINC_NET" ] ; then
|
||||
tincd -n "$IF_TINC_NET" -k
|
||||
sleep 0.1
|
||||
i=0;
|
||||
while [ -f "/var/run/tinc.$IF_TINC_NET.pid" ] ; do
|
||||
if [ $i = '30' ] ; then
|
||||
echo 'Failed to stop tinc daemon!'
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.1
|
||||
i=$(($i+1))
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
37
debian/tinc.if-pre-up
vendored
Executable file
37
debian/tinc.if-pre-up
vendored
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
[ -z "$IF_TINC_NET" ] && exit 0
|
||||
|
||||
# Read options from /etc/default
|
||||
|
||||
. /etc/default/tinc
|
||||
|
||||
# Read options from /etc/network/interfaces
|
||||
|
||||
[ -n "$IF_TINC_CONFIG" ] && EXTRA="$EXTRA -c $IF_TINC_CONFIG"
|
||||
[ -n "$IF_TINC_DEBUG" ] && EXTRA="$EXTRA -d$IF_TINC_DEBUG"
|
||||
[ -n "$IF_TINC_MLOCK" ] && EXTRA="$EXTRA --mlock"
|
||||
[ -n "$IF_TINC_LOGFILE" ] && EXTRA="$EXTRA --logfile=$IF_TINC_LOGFILE"
|
||||
[ -n "$IF_TINC_CHROOT" ] && EXTRA="$EXTRA --chroot"
|
||||
[ -n "$IF_TINC_USER" ] && EXTRA="$EXTRA --user=$IF_TINC_USER"
|
||||
|
||||
# Start tinc daemon
|
||||
|
||||
/usr/sbin/tincd -n "$IF_TINC_NET" -o "Interface=$IFACE" $EXTRA
|
||||
|
||||
# Wait for it to come up properly
|
||||
|
||||
sleep 0.1
|
||||
i=0;
|
||||
while [ ! -f "/var/run/tinc.$IF_TINC_NET.pid" ] ; do
|
||||
if [ $i = '30' ] ; then
|
||||
echo 'Failed to start tinc daemon!'
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.1
|
||||
i=$(($i+1))
|
||||
done
|
||||
|
||||
exit 0
|
||||
8
debian/tinc.if-up
vendored
Executable file
8
debian/tinc.if-up
vendored
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
[ "$METHOD" = loopback ] && exit 0
|
||||
[ -n "$IF_TINC_NET" ] && exit 0
|
||||
|
||||
invoke-rc.d tinc alarm
|
||||
16
debian/init.d → debian/tinc.init
vendored
16
debian/init.d → debian/tinc.init
vendored
|
|
@ -44,6 +44,16 @@ foreach_net() {
|
|||
echo "."
|
||||
}
|
||||
|
||||
signal_running() {
|
||||
for i in /var/run/tinc.*pid; do
|
||||
if [ -f "$i" ]; then
|
||||
head -1 $i | while read pid; do
|
||||
kill -$1 $pid
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
start() {
|
||||
$DAEMON $EXTRA -n "$@"
|
||||
}
|
||||
|
|
@ -53,6 +63,9 @@ stop() {
|
|||
reload() {
|
||||
$DAEMON -n $1 -kHUP
|
||||
}
|
||||
alarm() {
|
||||
$DAEMON -n $1 -kALRM
|
||||
}
|
||||
restart() {
|
||||
stop "$@"
|
||||
sleep 0.5
|
||||
|
|
@ -82,6 +95,9 @@ case "$1" in
|
|||
restart)
|
||||
foreach_net "Restarting $DESC:" restart
|
||||
;;
|
||||
alarm)
|
||||
signal_running ALRM
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}"
|
||||
exit 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue