pkgsrc/comms/obexapp/files/obexapp.sh
plunky 6fbb608bdf tweaks and additions:
1. obexapp rc.d script so you can start server mode automatically

2. new patch-ae to make the sdp registration happen before obexapp
drops privileges as NetBSD uses LOCAL_CREDS so sdpd can't check the
credentials until the client does something.

3. slight tweak to the -A option for NetBSD (in patch-ad) as we have a
function to fetch the local device address.

4. use NetBSD-[4-9].*-* instead of checking for <bluetooth.h>
2007-03-01 21:39:08 +00:00

33 lines
674 B
Bash

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: obexapp.sh,v 1.1 2007/03/01 21:39:09 plunky Exp $
#
# PROVIDE: obexapp
# REQUIRE: sdpd
#
# variables used:
#
# obexapp_channel RFCOMM channel number
# obexapp_username username for -u option
# obexapp_pathname pathname for -r option
$rc_subr_loaded . /etc/rc.subr
name="obexapp"
rcvar=$name
command="@PREFIX@/bin/${name}"
load_rc_config ${name}
if @TEST@ -z "${obexapp_channel}"; then
err 1 "Must specify obexapp_channel"
fi
command_args="-s -S -C ${obexapp_channel} -r ${obexapp_pathname:-@VARBASE@/spool/obex}"
if @TEST@ "${obexapp_username}"; then
command_args="${command_args} -u ${obexapp_username}"
fi
run_rc_command "$1"