2002-04-11 07:26:14 +00:00
|
|
|
#! /bin/sh
|
|
|
|
# postinst script for tinc
|
|
|
|
#
|
|
|
|
# $Id: postinst,v 1.6 2000/05/21 23:01:28 zarq Exp $
|
|
|
|
#
|
|
|
|
# see: dh_installdeb(1)
|
|
|
|
|
|
|
|
TCONF="/etc/tinc"
|
|
|
|
NETSFILE="$TCONF/nets.boot"
|
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
|
|
|
RET="false"
|
2002-04-11 07:26:14 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# summary of how this script can be called:
|
|
|
|
# * <postinst> `configure' <most-recently-configured-version>
|
|
|
|
# * <old-postinst> `abort-upgrade' <new version>
|
|
|
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
|
|
|
# <new-version>
|
|
|
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
|
|
|
# <failed-install-package> <version> `removing'
|
|
|
|
# <conflicting-package> <version>
|
|
|
|
# for details, see /usr/doc/packaging-manual/
|
|
|
|
#
|
|
|
|
# quoting from the policy:
|
|
|
|
# Any necessary prompting should almost always be confined to the
|
|
|
|
# post-installation script, and should be protected with a conditional
|
|
|
|
# so that unnecessary prompting doesn't happen if a package's
|
|
|
|
# installation fails and the `postinst' is called with `abort-upgrade',
|
|
|
|
# `abort-remove' or `abort-deconfigure'.
|
|
|
|
|
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
|
|
|
# Automatically added by dh_installinit, edited for use with debconf
|
|
|
|
if [ -x "/etc/init.d/tinc" ]; then
|
|
|
|
update-rc.d tinc defaults >/dev/null
|
|
|
|
|
|
|
|
if [ "$1" = "configure" ] ; then
|
|
|
|
if dpkg --compare-versions "$2" lt "1.0pre5-4" ; then
|
|
|
|
RET="true"
|
|
|
|
else
|
|
|
|
if [ -e /usr/share/debconf/confmodule ] ; then
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
db_get tinc/restart_on_upgrade
|
|
|
|
db_stop
|
|
|
|
else
|
|
|
|
RET="true"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# End automatically added section
|
|
|
|
|
|
|
|
|
2002-04-11 07:26:14 +00:00
|
|
|
case "$1" in
|
|
|
|
configure)
|
|
|
|
if [ ! -e /dev/.devfsd -a ! -e /dev/.devfs ] ; then
|
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
|
|
|
if [ ! -e /dev/net/tun -a ! -e /dev/tun ] ; then
|
|
|
|
echo "Creating tun device..."
|
|
|
|
cd /dev && ./MAKEDEV net/tun 2>/dev/null || ./MAKEDEV tun 2>/dev/null || echo "Failed to create tun device."
|
|
|
|
fi
|
2002-04-11 07:26:14 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e $NETSFILE ] ; then
|
|
|
|
echo "## This file contains all names of the networks to be started on system startup." > $NETSFILE
|
|
|
|
fi
|
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
|
|
|
|
|
|
|
if [ "$RET" = "true" ] ; then
|
|
|
|
invoke-rc.d tinc start
|
|
|
|
else
|
|
|
|
echo "I have not stopped or restarted the tinc daemon. You should do this"
|
|
|
|
echo "yourself whenever you're ready; type \`\`invoke-rc.d tinc restart''."
|
|
|
|
fi
|
|
|
|
;;
|
2002-04-11 07:26:14 +00:00
|
|
|
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
|
|
# generated by other debhelper scripts.
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
|