summaryrefslogtreecommitdiff
path: root/pcr/trousers/trousers.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-10-03 03:57:58 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-10-03 03:57:58 -0300
commit304b04f31a2113937601f7fafe08de600d5545f8 (patch)
tree48fee6dcaa8ec2cb05422b5826ed1f66a7d53724 /pcr/trousers/trousers.install
parentbbe6d0a7210bcd0c7b393b19c6b791bcbbd3a52e (diff)
trousers: add new package to [pcr]
Diffstat (limited to 'pcr/trousers/trousers.install')
-rw-r--r--pcr/trousers/trousers.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/pcr/trousers/trousers.install b/pcr/trousers/trousers.install
new file mode 100644
index 000000000..3725e078b
--- /dev/null
+++ b/pcr/trousers/trousers.install
@@ -0,0 +1,21 @@
+post_install() {
+ groupadd -r tss
+
+ useradd -r -g tss -d /var/lib/tpm -s /bin/false tss
+ chown -R tss:tss /var/lib/tpm
+ chown tss:tss /usr/bin/tcsd
+
+ chown tss:tss /etc/tcsd.conf
+ chmod 0600 /etc/tcsd.conf
+
+ udevadm trigger --sysname-match="tpm[0-9]*"
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ systemctl stop tcsd
+ userdel tss
+}