Add pidfile [1]

While I'm here, don't run the sysctl frob unconditionally, and
s/sysctl/$SYSCTL/

PR:		conf/153460 [1]
Submitted by:	Grigory Rechistov <ggg_mail@inbox.ru>
This commit is contained in:
Doug Barton 2010-12-27 22:52:47 +00:00
parent ff802dc7bb
commit be59eea018
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216744

View File

@ -13,11 +13,17 @@
name="devd"
rcvar=`set_rcvar`
command="/sbin/${name}"
pidfile=/var/run/${name}.pid
start_precmd=${name}_prestart
devd_prestart ()
{
# If devd is disabled, turn it off in the kernel to avoid memory leaks.
if ! checkyesno ${rcvar}; then
$SYSCTL hw.bus.devctl_disable=1
fi
}
load_rc_config $name
run_rc_command "$1"
# If devd is disabled, turn it off in the kernel to avoid memory leaks.
if ! checkyesno ${rcvar}; then
sysctl hw.bus.devctl_disable=1
fi