#!/bin/sh # $FreeBSD: head/security/opencryptoki/files/pkcsslotd.in 360949 2014-07-06 18:06:59Z tijl $ # # 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 /var/lib/opencryptoki/pk_config_data ] || \ %%PREFIX%%/sbin/pkcs11_startup } load_rc_config ${name} : pkcsslotd_enable=${pkcsslotd_enable-"NO"} run_rc_command "$1"