2 # postinst script for tinc
4 # $Id: postinst,v 1.6 2000/05/21 23:01:28 zarq Exp $
6 # see: dh_installdeb(1)
9 NETSFILE="$TCONF/nets.boot"
13 # summary of how this script can be called:
14 # * <postinst> `configure' <most-recently-configured-version>
15 # * <old-postinst> `abort-upgrade' <new version>
16 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
18 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
19 # <failed-install-package> <version> `removing'
20 # <conflicting-package> <version>
21 # for details, see /usr/doc/packaging-manual/
23 # quoting from the policy:
24 # Any necessary prompting should almost always be confined to the
25 # post-installation script, and should be protected with a conditional
26 # so that unnecessary prompting doesn't happen if a package's
27 # installation fails and the `postinst' is called with `abort-upgrade',
28 # `abort-remove' or `abort-deconfigure'.
32 if [ ! -e /dev/.devfs ] ; then
34 for d in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
35 test -e /dev/tap$d || devices_exist=0
37 if [ $devices_exist -eq 0 ] ; then
38 cd /dev && ./MAKEDEV netlink || true
42 if [ ! -e $NETSFILE ] ; then
43 echo "## This file contains all names of the networks to be started on system startup." > $NETSFILE
47 abort-upgrade|abort-remove|abort-deconfigure)
52 echo "postinst called with unknown argument \`$1'" >&2
57 # dh_installdeb will replace this with shell code automatically
58 # generated by other debhelper scripts.