diff options
author | Norikatsu Shigemura <nork@FreeBSD.org> | 2010-12-13 18:38:54 +0000 |
---|---|---|
committer | Norikatsu Shigemura <nork@FreeBSD.org> | 2010-12-13 18:38:54 +0000 |
commit | 339a230ae5a0f836ecd8f0f3b7a8a2e41c926a1e (patch) | |
tree | e8d335af563f25547e3c3b9ce93b207d2f1460bb | |
parent | 70d97cf7a248e727d4806c40831919088368e73b (diff) | |
download | freebsd-ports-339a230ae5a0f836ecd8f0f3b7a8a2e41c926a1e.zip |
Add support rc script. (buggy by not install USER/GROUP)
[NOTE]
In this time, I don't bump PORTREVISION. Because I must install
_tss user and group account(bug), and I'll re-setup working
directory under $PREFIX. So I'll finish these working, and
bump PORTREVISION.
-rw-r--r-- | emulators/tpm-emulator/Makefile | 1 | ||||
-rw-r--r-- | emulators/tpm-emulator/files/tpmd.in | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/emulators/tpm-emulator/Makefile b/emulators/tpm-emulator/Makefile index 5d32bc2452cf..59d58bd6c55c 100644 --- a/emulators/tpm-emulator/Makefile +++ b/emulators/tpm-emulator/Makefile @@ -17,6 +17,7 @@ COMMENT= Trusted Platform Module (TPM) emulator LIB_DEPENDS= gmp.10:${PORTSDIR}/math/gmp USE_CMAKE= YES +USE_RC_SUBR= tpmd USE_LDCONFIG= YES MAKE_JOBS_SAFE= YES diff --git a/emulators/tpm-emulator/files/tpmd.in b/emulators/tpm-emulator/files/tpmd.in new file mode 100644 index 000000000000..f497e38757b6 --- /dev/null +++ b/emulators/tpm-emulator/files/tpmd.in @@ -0,0 +1,31 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: tpmd +# REQUIRE: SERVERS +# BEFORE: tcsd +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# tpmd_enable (bool): Set to NO by default. +# Set it to YES to enable tpmd. + +. /etc/rc.subr + +name=tpmd +rcvar=`set_rcvar` +command="%%PREFIX%%/bin/${name}" + +load_rc_config $name + +tpmd_enable=${tpmd_enable-"NO"} +tpmd_user=${tpmd_user-"_tss"} +tpmd_group=${tpmd_group-"_tss"} + +command_args="-o ${tpmd_user} -g ${tpmd_group}" +unset tpmd_user tpmd_group + +run_rc_command "$1" |