On 21.09.15 01:30, Dirk Engling wrote:

> Maybe the rc script should check if the stack is already set up and exit
> with a more verbose error and then not shut down the interface?

I think the attached patch does what is needed. Looking forward to your
comments.

  erdgeist
--- /etc/rc.d/bluetooth 2015-08-12 16:21:53.000000000 +0200
+++ bluetooth   2015-09-21 02:29:52.113993498 +0200
@@ -95,6 +95,10 @@
        hook=$1
        shift
 
+       # Check if stack is already set up for device
+       ngctl status ${dev}hci: 2> /dev/null > /dev/null &&
+               err 0 "Stack already set up for ${dev}" && return 0
+
        # Setup HCI
        ngctl mkpeer ${dev}: hci ${hook} drv \
                > /dev/null 2>&1 || return 1
_______________________________________________
freebsd-bluetooth@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth
To unsubscribe, send any mail to "freebsd-bluetooth-unsubscr...@freebsd.org"

Reply via email to