This file is indexed.

postinst is in tinc 1.0.23-2.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh

NETSFILE="/etc/tinc/nets.boot"

set -e

case "$1" in
    configure)
	if [ ! -e /dev/.devfsd ] ; then if [ ! -e /dev/.devfs ] ; then
		if [ ! -e /dev/net/tun ] ; then if [ ! -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; fi
	fi; fi

	if [ ! -e $NETSFILE ] ; then
	    echo "## This file contains all names of the networks to be started on system startup." > $NETSFILE
	fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/tinc" ] || [ -e "/etc/init/tinc.conf" ]; then
	if [ ! -e "/etc/init/tinc.conf" ]; then
		update-rc.d tinc defaults >/dev/null
	fi
	if [ -n "$2" ]; then
		_dh_action=restart
	else
		_dh_action=start
	fi
	invoke-rc.d tinc $_dh_action || exit $?
fi
# End automatically added section