diff options
Diffstat (limited to 'debian/trousers.postinst')
-rw-r--r-- | debian/trousers.postinst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/trousers.postinst b/debian/trousers.postinst new file mode 100644 index 0000000..4748863 --- /dev/null +++ b/debian/trousers.postinst @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +case "${1}" in + configure) + # Adding tss system user + adduser --system --quiet --home /var/lib/tpm --shell /bin/false --no-create-home --group tss + + # Setting owner + chown tss:tss /var/lib/tpm -R + chown tss:tss /etc/tcsd.conf + + # Setting permissions + chmod 0600 /etc/tcsd.conf + chmod 0700 /var/lib/tpm + + # ask udev to check for new udev rules (and fix device permissions) + [ -x /etc/init.d/udev ] && pidof udevd > /dev/null \ + && udevadm trigger --sysname-match="tpm[0-9]*" + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 |