2005-10-11 19:16:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: sdpd
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
# BEFORE: LOGIN
|
|
|
|
# KEYWORD: nojail
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="sdpd"
|
2005-11-15 20:36:26 +00:00
|
|
|
command="/usr/sbin/${name}"
|
|
|
|
rcvar=`set_rcvar`
|
2005-11-22 18:51:43 +00:00
|
|
|
start_precmd="sdpd_prestart"
|
2005-11-15 20:36:26 +00:00
|
|
|
|
2005-11-22 18:51:43 +00:00
|
|
|
sdpd_prestart()
|
2005-11-15 20:36:26 +00:00
|
|
|
{
|
2005-11-22 19:17:41 +00:00
|
|
|
if ! kldstat -q -m ng_btsocket ; then
|
2005-11-22 18:51:43 +00:00
|
|
|
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
|
2005-11-15 20:36:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
2005-10-11 19:16:48 +00:00
|
|
|
control="${sdpd_control:-/var/run/sdp}"
|
2005-11-22 18:51:43 +00:00
|
|
|
group="${sdpd_groupname:-nobody}"
|
|
|
|
user="${sdpd_username:-nobody}"
|
2005-10-11 19:16:48 +00:00
|
|
|
command_args="-c ${control} -g ${group} -u ${user}"
|
|
|
|
|
|
|
|
run_rc_command "$1"
|