This file is indexed.

postinst is in openswan-modules-dkms 1:2.6.38-1.

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
#!/bin/sh
set -e

VERSION=$(dpkg-query -W -f='${Version}' openswan-modules-dkms | sed -e 's/.*:\(.*\)-.*/\1/')
ARCH=`dpkg --print-architecture`

. /usr/share/debconf/confmodule

case "$1" in
    configure)
	if [ -x /usr/lib/dkms/common.postinst ]; then
	    /usr/lib/dkms/common.postinst openswan $VERSION /usr/share/openswan-modules-dkms $ARCH $2

	    if [ "`ipsec setup --status | grep 'IPsec running'`" ]; then
		db_get openswan/restart

		if [ "$RET" = "true" ]; then
		    invoke-rc.d ipsec stop || true
		    modprobe -r ipsec
		    modprobe ipsec 2>/dev/null || true
		    invoke-rc.d ipsec start || true
		fi
	    else
		if grep -q ipsec /proc/modules 2>/dev/null ; then
		    modprobe -r ipsec
		    modprobe ipsec 2>/dev/null || true
		fi
	    fi
	fi
	db_stop
    ;;
esac