Stated that distributing executables linked with OpenSSL is permitted
[tinc] / debian / postinst
1 #! /bin/sh
2 # postinst script for tinc
3 #
4 # $Id: postinst,v 1.6 2000/05/21 23:01:28 zarq Exp $
5 #
6 # see: dh_installdeb(1)
7
8 TCONF="/etc/tinc"
9 NETSFILE="$TCONF/nets.boot"
10
11 set -e
12
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>
17 #          <new-version>
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/
22 #
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'.
29
30 case "$1" in
31     configure)
32         if [ ! -e /dev/.devfs ] ; then
33             devices_exist=1
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
36             done
37             if [ $devices_exist -eq 0 ] ; then
38                 cd /dev && ./MAKEDEV netlink || true
39             fi
40         fi
41
42         if [ ! -e $NETSFILE ] ; then
43             echo "## This file contains all names of the networks to be started on system startup." > $NETSFILE
44         fi
45     ;;
46
47     abort-upgrade|abort-remove|abort-deconfigure)
48
49     ;;
50
51     *)
52         echo "postinst called with unknown argument \`$1'" >&2
53         exit 0
54     ;;
55 esac
56
57 # dh_installdeb will replace this with shell code automatically
58 # generated by other debhelper scripts.
59
60 #DEBHELPER#
61
62 exit 0
63
64