All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rainer Dorsch <rdorsch@web.de>
To: bluez-users@lists.sourceforge.net
Subject: [Bluez-users] hotplug script needs to sleep before calling pand
Date: Mon, 3 Jan 2005 11:50:38 +0100	[thread overview]
Message-ID: <200501031150.38882.rdorsch@web.de> (raw)

Hello,

my /etc/hotplug.d/usb/epox-bluetooth.hotplug script needs to sleep before it 
can start pand, otherwith pand won't call /etc/bluetooth/pan/dev-up (and it 
will also not bring up the device directly as discussed in a separate 
posting).

The script looks like this:


#!/bin/sh
pidfile=/var/run/pand.pid
DAEMON=/usr/bin/pand

CHARS=`echo $DEVPATH| wc -c`
VERSION=`echo $DEVPATH|cut -c $((CHARS-3))-$CHARS`

(date
echo $DEVPATH
echo $PRODUCT
echo $TYPE
echo $ACTION
echo $CHARS
echo $VERSION) >> /tmp/epox.log


case `echo $PRODUCT|cut -d / -f 1-2` in
        # a12/1/525 and a12/1/828 have been seen for the Epox BT DB02A
        a12/1) break ;;
        *) exit ;;
esac
case $TYPE in
        224/1/1) break ;;
        *) exit ;;
esac
case $ACTION in
        add)
            if [ ! -z VERSION ]; then
              if [ $VERSION = 1.0 ]; then
                sleep 1
                start-stop-daemon --start --exec $DAEMON -- --nodetach --role 
PANU --search --encrypt --pidfile $pidfile
              fi
            fi
            ;;
        remove)
            start-stop-daemon --stop --exec $DAEMON --pidfile $pidfile
            ifdown bnep0
            ;;
esac


Any ideas why sleep is needed (and 0.5 seconds are not enough) are welcome.

Thanks,
Rainer



-- 
Rainer Dorsch
Alzentalstr. 28
D-71083 Herrenberg
07032-919495
Icq: 32550367


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

                 reply	other threads:[~2005-01-03 10:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501031150.38882.rdorsch@web.de \
    --to=rdorsch@web.de \
    --cc=bluez-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.