blob: e931d61432807fd8576191c6ea33fec79f5776f9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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=pkcsslotd_enable
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"
|