Deleted Added
full compact
bluetooth (180563) bluetooth (180618)
1#!/bin/sh
2#
3# Copyright (c) 2005 Maksim Yevmenkin <m_evmenkin@yahoo.com>
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
1#!/bin/sh
2#
3# Copyright (c) 2005 Maksim Yevmenkin <m_evmenkin@yahoo.com>
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/etc/rc.d/bluetooth 180563 2008-07-16 19:22:48Z dougb $
27# $FreeBSD: head/etc/rc.d/bluetooth 180618 2008-07-19 20:11:33Z marcel $
28
29# PROVIDE: bluetooth
30# REQUIRE: DAEMON
31# KEYWORD: nojail nostart
32
33. /etc/rc.subr
34
35name="bluetooth"

--- 193 unchanged lines hidden (view full) ---

229bluetooth_start()
230{
231 local _file
232
233 dev=$1
234
235 # Try to figure out device type by looking at device name
236 case "${dev}" in
28
29# PROVIDE: bluetooth
30# REQUIRE: DAEMON
31# KEYWORD: nojail nostart
32
33. /etc/rc.subr
34
35name="bluetooth"

--- 193 unchanged lines hidden (view full) ---

229bluetooth_start()
230{
231 local _file
232
233 dev=$1
234
235 # Try to figure out device type by looking at device name
236 case "${dev}" in
237 # sioX - serial/UART Bluetooth device
238 sio*)
237 # uartX - serial/UART Bluetooth device
238 uart*)
239 load_kld ng_h4 || return 1
240
241 hook="hook"
242
243 # Obtain unit number from device.
239 load_kld ng_h4 || return 1
240
241 hook="hook"
242
243 # Obtain unit number from device.
244 unit=`expr ${dev} : 'sio\([0-9]\{1,\}\)'`
244 unit=`expr ${dev} : 'uart\([0-9]\{1,\}\)'`
245 if [ -z "${unit}" ]; then
245 if [ -z "${unit}" ]; then
246 err 1 "Unable to get sio unit number: ${dev}"
246 err 1 "Unable to get uart unit number: ${dev}"
247 fi
248
247 fi
248
249 ${hcseriald} -f /dev/cuad${unit} -n ${dev}
249 ${hcseriald} -f /dev/cuau${unit} -n ${dev}
250 sleep 1 # wait a little bit
251
252 if [ ! -f "/var/run/hcseriald.${dev}.pid" ]; then
253 err 1 "Unable to start hcseriald on ${dev}"
254 fi
255 ;;
256
257 # 3Com Bluetooth Adapter 3CRWB60-A

--- 63 unchanged lines hidden (view full) ---

321##############################################################################
322
323bluetooth_stop()
324{
325 dev=$1
326
327 # Try to figure out device type by looking at device name
328 case "${dev}" in
250 sleep 1 # wait a little bit
251
252 if [ ! -f "/var/run/hcseriald.${dev}.pid" ]; then
253 err 1 "Unable to start hcseriald on ${dev}"
254 fi
255 ;;
256
257 # 3Com Bluetooth Adapter 3CRWB60-A

--- 63 unchanged lines hidden (view full) ---

321##############################################################################
322
323bluetooth_stop()
324{
325 dev=$1
326
327 # Try to figure out device type by looking at device name
328 case "${dev}" in
329 # sioX - serial/UART Bluetooth device
330 sio*)
329 # uartX - serial/UART Bluetooth device
330 uart*)
331 if [ -f "/var/run/hcseriald.${dev}.pid" ]; then
332 kill `cat /var/run/hcseriald.${dev}.pid`
333 sleep 1 # wait a little bit
334 fi
335 ;;
336
337 # 3Com Bluetooth Adapter 3CRWB60-A
338 btccc*)

--- 27 unchanged lines hidden ---
331 if [ -f "/var/run/hcseriald.${dev}.pid" ]; then
332 kill `cat /var/run/hcseriald.${dev}.pid`
333 sleep 1 # wait a little bit
334 fi
335 ;;
336
337 # 3Com Bluetooth Adapter 3CRWB60-A
338 btccc*)

--- 27 unchanged lines hidden ---