diff options
Diffstat (limited to 'security/opencryptoki/files/pkcsslotd.in')
-rw-r--r-- | security/opencryptoki/files/pkcsslotd.in | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/security/opencryptoki/files/pkcsslotd.in b/security/opencryptoki/files/pkcsslotd.in new file mode 100644 index 000000000000..ca0fb7744dc3 --- /dev/null +++ b/security/opencryptoki/files/pkcsslotd.in @@ -0,0 +1,33 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: pkcsslotd +# REQUIRE: LOGIN tcsd +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# pkcsslotd_enable (bool): Set to NO by default. +# Set it to YES to enable pkcsslotd. +# + +. /etc/rc.subr + +name=pkcsslotd +rcvar=`set_rcvar` +command=%%PREFIX%%/sbin/${name} +start_precmd=${name}_prestart + +pkcsslotd_prestart () { + [ -f %%PREFIX%%/var/lib/opencryptoki/pk_config_data ] || \ + %%PREFIX%%/sbin/pkcs11_startup +} + +load_rc_config ${name} + +: pkcsslotd_enable=${pkcsslotd_enable-"NO"} + +run_rc_command "$1" + |