File: opencryptoki.postinst

package info (click to toggle)
opencryptoki 3.23.0%2Bdfsg-0.3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,604 kB
  • sloc: ansic: 214,248; sh: 2,759; makefile: 289; yacc: 242; pascal: 152; exp: 126; lex: 93; cpp: 9
file content (30 lines) | stat: -rw-r--r-- 581 bytes parent folder | download
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
#!/bin/sh

set -e

case "${1}" in
	configure)
		addgroup --system pkcs11
		adduser --system --ingroup pkcs11 --home /run/opencryptoki --no-create-home --shell /usr/sbin/nologin --comment "Opencryptoki pkcsslotd user" pkcsslotd

		usermod -a -G pkcs11 root

		chown root:pkcs11 /etc/opencryptoki/p11sak_defined_attrs.conf
		chown root:pkcs11 /etc/opencryptoki/strength.conf
		chmod 640 /etc/opencryptoki/strength.conf

		;;

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

		;;

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

#DEBHELPER#

exit 0