83eb2c3700
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
31 lines
571 B
Bash
31 lines
571 B
Bash
#!/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=tpmd_enable
|
|
command="%%PREFIX%%/bin/${name}"
|
|
|
|
load_rc_config $name
|
|
|
|
tpmd_enable=${tpmd_enable-"NO"}
|
|
tpmd_user=${tpmd_user-"%%USERS%%"}
|
|
tpmd_group=${tpmd_group-"%%GROUPS%%"}
|
|
|
|
command_args="-o ${tpmd_user} -g ${tpmd_group}"
|
|
unset tpmd_user tpmd_group
|
|
|
|
run_rc_command "$1"
|