Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: btpand exec at boot time



Hi! Iain,


From: Iain Hibbert <plunky%rya-online.net@localhost>
Date: Mon, 6 Apr 2009 11:47:35 +0100 (BST)

> Yes but I don't really like that option. (SDP should always be used :),
> you can start sdpd in rc.local also to control the ordering or just add
> BEFORE: local to /etc/rc.d/sdpd will make it start up first.
> 
> > How do you start obexapp?  I hope to start sdpd more beforehand.
> 
> I use
> 
> obexapp=YES
> obexapp_channel="10"
> 
> in /etc/rc.conf

seems to work!


> probably is needed a /etc/rc.d/btpand using /etc/bluetooth/btpand.conf to
> start daemons as required. Something like (incomplete, not tested, could
> be better) attached?

I fix a bit.  ;-)

--- btpand.orig 2009-04-08 19:58:13.000000000 +0900
+++ btpand      2009-04-08 19:58:49.000000000 +0900
@@ -20,19 +20,20 @@
 btpand_start()
 {
 
-       while read -r service device flags; do
+       while read -r service device address flags; do
                case "${service}" in
                \#*|"")
                        continue
                        ;;
                esac
 
-               if [ -z "${device}" ]; then
+               if [ -z "${device}" -o -z ${address} ]; then
                        echo "${name}: invalid entry"
                        return 1
                fi
 
-               /usr/sbin/btpand -d ${device} -s ${service} ${flags:-"-m auth"}
+               /usr/sbin/btpand -d ${device} -s ${service} -a ${address} \
+                   ${flags:-(-m auth)}
        done < /etc/bluetooth/btpand.conf
 }
 

Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index