This file is indexed.

postinst is in softhsm2-common 2.2.0-3.1build1.

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
#!/bin/sh
# postinst script for softhsm-common

set -e

set_perms() {
    if ! dpkg-statoverride --list "$4" >/dev/null; then
        dpkg-statoverride --update --add "$@"
    fi
}

case "$1" in
    configure)

	# add softhsm group if it doesn't exists
	if ! getent group softhsm > /dev/null; then
	    groupadd --system softhsm > /dev/null
	fi

	# set correct permissions on softhsm directories
	set_perms root softhsm 0750 /etc/softhsm
	set_perms root softhsm 02770 /var/lib/softhsm

	# create new and update old configuration file and set permissions
	ucf /usr/share/softhsm/softhsm2.conf /etc/softhsm/softhsm2.conf
	ucfr softhsm /etc/softhsm/softhsm2.conf
	set_perms root softhsm 0640 /etc/softhsm/softhsm2.conf
    ;;

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

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



exit 0