2002-04-11 07:26:14 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
2006-11-14 15:32:20 +00:00
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: tinc
|
2010-02-17 22:00:31 +00:00
|
|
|
# Required-Start: $remote_fs $network
|
|
|
|
# Required-Stop: $remote_fs $network
|
2006-11-14 15:32:20 +00:00
|
|
|
# Should-Start: $syslog $named
|
|
|
|
# Should-Stop: $syslog
|
|
|
|
# Default-Start: 2 3 4 5
|
|
|
|
# Default-Stop: 0 1 6
|
|
|
|
# Short-Description: Start tinc daemons
|
|
|
|
# Description: Create a file $NETSFILE (/etc/tinc/nets.boot),
|
|
|
|
# and put all the names of the networks in there.
|
|
|
|
# These names must be valid directory names under
|
|
|
|
# $TCONF (/etc/tinc). Lines starting with a # will be
|
|
|
|
# ignored in this file.
|
|
|
|
### END INIT INFO
|
2002-04-11 07:26:14 +00:00
|
|
|
#
|
|
|
|
# Based on Lubomir Bulej's Redhat init script.
|
|
|
|
|
|
|
|
DAEMON="/usr/sbin/tincd"
|
|
|
|
NAME="tinc"
|
|
|
|
DESC="tinc daemons"
|
|
|
|
TCONF="/etc/tinc"
|
|
|
|
NETSFILE="$TCONF/nets.boot"
|
|
|
|
NETS=""
|
|
|
|
|
|
|
|
test -f $DAEMON || exit 0
|
|
|
|
|
Import Debian changes 1.0.3-4
tinc (1.0.3-4) unstable; urgency=low
* Call debconf early in postinst so it won't get confused by output
from other commands in the postinst script. Closes: #292920
* If MAKEDEV doesn't know about net/tun, fall back to tun.
tinc (1.0.3-3) unstable; urgency=low
* Fix clean rule in debian/rules.
tinc (1.0.3-2) unstable; urgency=low
* Don't check for /dev/tap* in postinst if we don't create them anyway.
* MAKEDEV expects net/tun instead of tun.
* Don't ask if /dev/net/tun should be created, just do it.
Closes: #259489, #292450
* Move $EXTRA from init.d/tinc to /etc/default/tinc. Closes: #281366
tinc (1.0.3-1) unstable; urgency=low
* New upstream release.
* Adopting the package from Ivo.
* Use invoke-rc.d, and tell user to do so as well. Closes: #223276
* Let force-reload do the same thing as reload. Closes: #230180
tinc (1.0.2-2) unstable; urgency=low
* debian/control: Oops, really make that automake1.7.
tinc (1.0.2-1) unstable; urgency=low
* New upstream release:
* Fix broken replies to CHAL_RESP. (Closes: #217646)
* debian/control: Updated automake build dependency to automake1.7.
(Closes: #219360)
tinc (1.0.1-2) unstable; urgency=low
* debian/dirs: Removed, moved contents to tinc.dirs.
(Closes: #208591)
* debian/docs: Renamed to tinc.docs.
* debian/rules: Install the contents of doc/sample-config.tar.gz in
/usr/share/doc/tinc/examples instead of /etc/tinc.
* debian/Makefile*: Removed.
tinc (1.0.1-1) unstable; urgency=low
* New upstream release.
* debian/patches/001_openbsd_device.c.patch: Removed.
tinc (1.0release-1) unstable; urgency=low
* New upstream version. (Closes: #204639)
* Fixes switching back to normal logging mode when killing with
SIGINT twice. (Closes: #175633)
* Uses one SSL context struct for each connection, speeding up
encrypting/decrypting data; don't throw away out of sequence
packets. (Closes: #188874)
* Fixes handling of broadcast messages. (Closes: #175632)
* debian/rules: Use cdbs.
* debian/control: Build-Depend on cdbs, liblzo-dev.
* debian/patches/001_openbsd_device.c.patch: Sync openbsd/device.c to
latest CVS version.
tinc (1.0pre8-6) unstable; urgency=low
* debian/po/fr.po: Added French debconf translation. (Closes: #201803)
tinc (1.0pre8-5) unstable; urgency=low
* debian/*: Change to po-debconf, thanks to From: Michel Grentzinger
<mic.grentz@online.fr> for the patch:
- change debhelper dependency to 4.1.16 (according to man
po-debconf),
- manually add nl translation in old tinc.templates (master),
- run debconf-gettextize debian/tinc.templates,
- move old templates files (debian/tinc.templates.*),
- change construction "If you say no" to "If you refuse",
* debian/rules: Call po2debconf.
* debian/rules: Don't copy COPYING.README to the package.
* debian/control: Update Standards-Version.
* debian/conffiles: Removed.
* debian/postinst: No longer use mknod directly, use MAKEDEV.
tinc (1.0pre8-4) unstable; urgency=low
* src/net.h, src/net_packet.c, src/net_setup.c: Apply fix from CVS
for OpenSSL-related memory leaks. (Closes: #189432)
tinc (1.0pre8-3) unstable; urgency=low
* m4/openssl.m4: Updated to CVS version. (Closes: #184400)
tinc (1.0pre8-2) unstable; urgency=low
* debian/postinst: Create /dev/net/tun if it doesn't exist.
* debian/tinc.modules: Add alias for /dev/net/tun.
* debian/rules: Install tinc.modules.
* These things together: (Closes: #151967, #153156)
tinc (1.0pre8-1) unstable; urgency=low
* New upstream version.
* debian/rules:
- DEB_BUILD_OPTIONS support.
- Enable --enable-tracing by default.
tinc (1.0pre7-3) unstable; urgency=low
* Properly install _all_ info pages. (Closes: #144718)
2005-01-31 12:27:16 +00:00
|
|
|
[ -r /etc/default/tinc ] && . /etc/default/tinc
|
|
|
|
|
2010-02-17 22:00:31 +00:00
|
|
|
# foreach_net "what-to-say" action [arguments...]
|
|
|
|
foreach_net() {
|
2002-04-11 07:26:14 +00:00
|
|
|
if [ ! -f $NETSFILE ] ; then
|
|
|
|
echo "Please create $NETSFILE."
|
|
|
|
exit 0
|
|
|
|
fi
|
2010-02-17 22:00:31 +00:00
|
|
|
echo -n "$1"
|
|
|
|
shift
|
|
|
|
egrep '^[ ]*[a-zA-Z0-9_-]+' $NETSFILE | while read net args; do
|
|
|
|
echo -n " $net"
|
|
|
|
"$@" $net $args
|
|
|
|
done
|
|
|
|
echo "."
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
$DAEMON $EXTRA -n "$@"
|
|
|
|
}
|
|
|
|
stop() {
|
|
|
|
$DAEMON -n $1 -k
|
|
|
|
}
|
|
|
|
reload() {
|
|
|
|
$DAEMON -n $1 -kHUP
|
|
|
|
}
|
|
|
|
restart() {
|
2010-04-13 10:06:36 +00:00
|
|
|
stop "$@"
|
|
|
|
sleep 0.5
|
|
|
|
i=0;
|
|
|
|
while [ -f /var/run/tinc.$1.pid ] ; do
|
|
|
|
if [ $i = '10' ] ; then
|
|
|
|
break
|
|
|
|
else
|
|
|
|
echo -n "."
|
|
|
|
sleep 0.5
|
|
|
|
i=$(($i+1))
|
|
|
|
fi
|
|
|
|
done
|
2010-02-17 22:00:31 +00:00
|
|
|
start "$@"
|
2002-04-11 07:26:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2010-02-17 22:00:31 +00:00
|
|
|
foreach_net "Starting $DESC:" start
|
2002-04-11 07:26:14 +00:00
|
|
|
;;
|
|
|
|
stop)
|
2010-02-17 22:00:31 +00:00
|
|
|
foreach_net "Stopping $DESC:" stop
|
2002-04-11 07:26:14 +00:00
|
|
|
;;
|
Import Debian changes 1.0.3-4
tinc (1.0.3-4) unstable; urgency=low
* Call debconf early in postinst so it won't get confused by output
from other commands in the postinst script. Closes: #292920
* If MAKEDEV doesn't know about net/tun, fall back to tun.
tinc (1.0.3-3) unstable; urgency=low
* Fix clean rule in debian/rules.
tinc (1.0.3-2) unstable; urgency=low
* Don't check for /dev/tap* in postinst if we don't create them anyway.
* MAKEDEV expects net/tun instead of tun.
* Don't ask if /dev/net/tun should be created, just do it.
Closes: #259489, #292450
* Move $EXTRA from init.d/tinc to /etc/default/tinc. Closes: #281366
tinc (1.0.3-1) unstable; urgency=low
* New upstream release.
* Adopting the package from Ivo.
* Use invoke-rc.d, and tell user to do so as well. Closes: #223276
* Let force-reload do the same thing as reload. Closes: #230180
tinc (1.0.2-2) unstable; urgency=low
* debian/control: Oops, really make that automake1.7.
tinc (1.0.2-1) unstable; urgency=low
* New upstream release:
* Fix broken replies to CHAL_RESP. (Closes: #217646)
* debian/control: Updated automake build dependency to automake1.7.
(Closes: #219360)
tinc (1.0.1-2) unstable; urgency=low
* debian/dirs: Removed, moved contents to tinc.dirs.
(Closes: #208591)
* debian/docs: Renamed to tinc.docs.
* debian/rules: Install the contents of doc/sample-config.tar.gz in
/usr/share/doc/tinc/examples instead of /etc/tinc.
* debian/Makefile*: Removed.
tinc (1.0.1-1) unstable; urgency=low
* New upstream release.
* debian/patches/001_openbsd_device.c.patch: Removed.
tinc (1.0release-1) unstable; urgency=low
* New upstream version. (Closes: #204639)
* Fixes switching back to normal logging mode when killing with
SIGINT twice. (Closes: #175633)
* Uses one SSL context struct for each connection, speeding up
encrypting/decrypting data; don't throw away out of sequence
packets. (Closes: #188874)
* Fixes handling of broadcast messages. (Closes: #175632)
* debian/rules: Use cdbs.
* debian/control: Build-Depend on cdbs, liblzo-dev.
* debian/patches/001_openbsd_device.c.patch: Sync openbsd/device.c to
latest CVS version.
tinc (1.0pre8-6) unstable; urgency=low
* debian/po/fr.po: Added French debconf translation. (Closes: #201803)
tinc (1.0pre8-5) unstable; urgency=low
* debian/*: Change to po-debconf, thanks to From: Michel Grentzinger
<mic.grentz@online.fr> for the patch:
- change debhelper dependency to 4.1.16 (according to man
po-debconf),
- manually add nl translation in old tinc.templates (master),
- run debconf-gettextize debian/tinc.templates,
- move old templates files (debian/tinc.templates.*),
- change construction "If you say no" to "If you refuse",
* debian/rules: Call po2debconf.
* debian/rules: Don't copy COPYING.README to the package.
* debian/control: Update Standards-Version.
* debian/conffiles: Removed.
* debian/postinst: No longer use mknod directly, use MAKEDEV.
tinc (1.0pre8-4) unstable; urgency=low
* src/net.h, src/net_packet.c, src/net_setup.c: Apply fix from CVS
for OpenSSL-related memory leaks. (Closes: #189432)
tinc (1.0pre8-3) unstable; urgency=low
* m4/openssl.m4: Updated to CVS version. (Closes: #184400)
tinc (1.0pre8-2) unstable; urgency=low
* debian/postinst: Create /dev/net/tun if it doesn't exist.
* debian/tinc.modules: Add alias for /dev/net/tun.
* debian/rules: Install tinc.modules.
* These things together: (Closes: #151967, #153156)
tinc (1.0pre8-1) unstable; urgency=low
* New upstream version.
* debian/rules:
- DEB_BUILD_OPTIONS support.
- Enable --enable-tracing by default.
tinc (1.0pre7-3) unstable; urgency=low
* Properly install _all_ info pages. (Closes: #144718)
2005-01-31 12:27:16 +00:00
|
|
|
reload|force-reload)
|
2010-02-17 22:00:31 +00:00
|
|
|
foreach_net "Reloading $DESC configuration:" reload
|
2002-04-11 07:26:14 +00:00
|
|
|
;;
|
Import Debian changes 1.0.3-4
tinc (1.0.3-4) unstable; urgency=low
* Call debconf early in postinst so it won't get confused by output
from other commands in the postinst script. Closes: #292920
* If MAKEDEV doesn't know about net/tun, fall back to tun.
tinc (1.0.3-3) unstable; urgency=low
* Fix clean rule in debian/rules.
tinc (1.0.3-2) unstable; urgency=low
* Don't check for /dev/tap* in postinst if we don't create them anyway.
* MAKEDEV expects net/tun instead of tun.
* Don't ask if /dev/net/tun should be created, just do it.
Closes: #259489, #292450
* Move $EXTRA from init.d/tinc to /etc/default/tinc. Closes: #281366
tinc (1.0.3-1) unstable; urgency=low
* New upstream release.
* Adopting the package from Ivo.
* Use invoke-rc.d, and tell user to do so as well. Closes: #223276
* Let force-reload do the same thing as reload. Closes: #230180
tinc (1.0.2-2) unstable; urgency=low
* debian/control: Oops, really make that automake1.7.
tinc (1.0.2-1) unstable; urgency=low
* New upstream release:
* Fix broken replies to CHAL_RESP. (Closes: #217646)
* debian/control: Updated automake build dependency to automake1.7.
(Closes: #219360)
tinc (1.0.1-2) unstable; urgency=low
* debian/dirs: Removed, moved contents to tinc.dirs.
(Closes: #208591)
* debian/docs: Renamed to tinc.docs.
* debian/rules: Install the contents of doc/sample-config.tar.gz in
/usr/share/doc/tinc/examples instead of /etc/tinc.
* debian/Makefile*: Removed.
tinc (1.0.1-1) unstable; urgency=low
* New upstream release.
* debian/patches/001_openbsd_device.c.patch: Removed.
tinc (1.0release-1) unstable; urgency=low
* New upstream version. (Closes: #204639)
* Fixes switching back to normal logging mode when killing with
SIGINT twice. (Closes: #175633)
* Uses one SSL context struct for each connection, speeding up
encrypting/decrypting data; don't throw away out of sequence
packets. (Closes: #188874)
* Fixes handling of broadcast messages. (Closes: #175632)
* debian/rules: Use cdbs.
* debian/control: Build-Depend on cdbs, liblzo-dev.
* debian/patches/001_openbsd_device.c.patch: Sync openbsd/device.c to
latest CVS version.
tinc (1.0pre8-6) unstable; urgency=low
* debian/po/fr.po: Added French debconf translation. (Closes: #201803)
tinc (1.0pre8-5) unstable; urgency=low
* debian/*: Change to po-debconf, thanks to From: Michel Grentzinger
<mic.grentz@online.fr> for the patch:
- change debhelper dependency to 4.1.16 (according to man
po-debconf),
- manually add nl translation in old tinc.templates (master),
- run debconf-gettextize debian/tinc.templates,
- move old templates files (debian/tinc.templates.*),
- change construction "If you say no" to "If you refuse",
* debian/rules: Call po2debconf.
* debian/rules: Don't copy COPYING.README to the package.
* debian/control: Update Standards-Version.
* debian/conffiles: Removed.
* debian/postinst: No longer use mknod directly, use MAKEDEV.
tinc (1.0pre8-4) unstable; urgency=low
* src/net.h, src/net_packet.c, src/net_setup.c: Apply fix from CVS
for OpenSSL-related memory leaks. (Closes: #189432)
tinc (1.0pre8-3) unstable; urgency=low
* m4/openssl.m4: Updated to CVS version. (Closes: #184400)
tinc (1.0pre8-2) unstable; urgency=low
* debian/postinst: Create /dev/net/tun if it doesn't exist.
* debian/tinc.modules: Add alias for /dev/net/tun.
* debian/rules: Install tinc.modules.
* These things together: (Closes: #151967, #153156)
tinc (1.0pre8-1) unstable; urgency=low
* New upstream version.
* debian/rules:
- DEB_BUILD_OPTIONS support.
- Enable --enable-tracing by default.
tinc (1.0pre7-3) unstable; urgency=low
* Properly install _all_ info pages. (Closes: #144718)
2005-01-31 12:27:16 +00:00
|
|
|
restart)
|
2010-02-17 22:00:31 +00:00
|
|
|
foreach_net "Restarting $DESC:" restart
|
2002-04-11 07:26:14 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|