summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/trousers/files/tcsd.initd')
-rw-r--r--app-crypt/trousers/files/tcsd.initd31
1 files changed, 6 insertions, 25 deletions
diff --git a/app-crypt/trousers/files/tcsd.initd b/app-crypt/trousers/files/tcsd.initd
index c9c050cb06d9..9b18c48e1ee3 100644
--- a/app-crypt/trousers/files/tcsd.initd
+++ b/app-crypt/trousers/files/tcsd.initd
@@ -1,38 +1,19 @@
#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+command=/usr/sbin/tcsd
+description="TrouSerS' TCS daemon (tcsd)"
+command_user="tss:tss"
+
depend() {
use logger
need net
}
-checkconfig() {
- local mod
- if [ -n "${TPM_MODULES}" ] ; then
- for mod in ${TPM_MODULES} ; do
- lsmod | grep -q "^${mod}\b" \
- || modprobe ${mod} &>/dev/null \
- || ewarn "Failed to load module ${mod}"
- done
- # Should we sleep or something to wait for device creation?
- fi
+start_pre() {
if [ ! -c /dev/tpm ] && [ ! -c /dev/tpm0 ] ; then
eerror "No TPM device found!"
return 1
fi
- return 0
-}
-
-start() {
- ebegin "Starting TrouSerS' TCS daemon (tcsd)"
- checkconfig || eend $?
- start-stop-daemon --start --user tss --exec /usr/sbin/tcsd
- eend $?
-}
-
-stop() {
- ebegin "Stopping TrouSerS' TCS daemon (tcsd)"
- start-stop-daemon --stop --quiet --exec /usr/sbin/tcsd --user tss
- eend $?
}