freebsd-skq/etc/rc.d/hcsecd
Maksim Yevmenkin f5937f20c1 Remove not needed redirection of kldstat -q output to /dev/null.
Noticed by:	pjd
MFC after:	3 days
2005-11-22 19:17:41 +00:00

39 lines
619 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: hcsecd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: nojail
. /etc/rc.subr
name="hcsecd"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
rcvar=`set_rcvar`
start_precmd="hcsecd_prestart"
hcsecd_prestart()
{
if ! kldstat -q -m ng_btsocket ; then
if kldload ng_btsocket > /dev/null 2>&1 ; then
info 'ng_btsocket module loaded'
else
warn 'ng_btsocket module failed to load'
return 1
fi
fi
return 0
}
load_rc_config $name
config="${hcsecd_config:-/etc/bluetooth/${name}.conf}"
command_args="-f ${config}"
required_files="${config}"
run_rc_command "$1"