bluetooth (180618) | bluetooth (208060) |
---|---|
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 180618 2008-07-19 20:11:33Z marcel $ | 27# $FreeBSD: head/etc/rc.d/bluetooth 208060 2010-05-14 04:53:57Z dougb $ |
28 29# PROVIDE: bluetooth 30# REQUIRE: DAEMON 31# KEYWORD: nojail nostart 32 33. /etc/rc.subr 34 35name="bluetooth" --- 54 unchanged lines hidden (view full) --- 90 91bluetooth_setup_stack() 92{ 93 dev=$1 94 shift 95 hook=$1 96 shift 97 | 28 29# PROVIDE: bluetooth 30# REQUIRE: DAEMON 31# KEYWORD: nojail nostart 32 33. /etc/rc.subr 34 35name="bluetooth" --- 54 unchanged lines hidden (view full) --- 90 91bluetooth_setup_stack() 92{ 93 dev=$1 94 shift 95 hook=$1 96 shift 97 |
98 # Setup HCI | 98 # Setup HCI |
99 ngctl mkpeer ${dev}: hci ${hook} drv \ 100 > /dev/null 2>&1 || return 1 101 102 ngctl name ${dev}:${hook} ${dev}hci \ 103 > /dev/null 2>&1 || return 1 104 105 ngctl msg ${dev}hci: set_debug ${bluetooth_device_hci_debug_level} \ 106 > /dev/null 2>&1 || return 1 --- 170 unchanged lines hidden (view full) --- 277 ;; 278 279 # Unknown 280 *) 281 err 1 "Unsupported device: ${dev}" 282 ;; 283 esac 284 | 99 ngctl mkpeer ${dev}: hci ${hook} drv \ 100 > /dev/null 2>&1 || return 1 101 102 ngctl name ${dev}:${hook} ${dev}hci \ 103 > /dev/null 2>&1 || return 1 104 105 ngctl msg ${dev}hci: set_debug ${bluetooth_device_hci_debug_level} \ 106 > /dev/null 2>&1 || return 1 --- 170 unchanged lines hidden (view full) --- 277 ;; 278 279 # Unknown 280 *) 281 err 1 "Unsupported device: ${dev}" 282 ;; 283 esac 284 |
285 # Be backward compatible and setup reasonable defaults | 285 # Be backward compatible and setup reasonable defaults |
286 bluetooth_device_authentication_enable="0" 287 bluetooth_device_class="ff:01:0c" 288 bluetooth_device_connectable="1" 289 bluetooth_device_discoverable="1" 290 bluetooth_device_encryption_mode="0" 291 bluetooth_device_hci_debug_level="3" 292 bluetooth_device_l2cap_debug_level="3" 293 bluetooth_device_local_name="`/usr/bin/uname -n` (${dev})" --- 13 unchanged lines hidden (view full) --- 307 err 1 "Unable to read Bluetooth device configuration from $_file" 308 fi 309 310 # Setup stack 311 if ! bluetooth_setup_stack ${dev} ${hook} ; then 312 bluetooth_shutdown_stack $dev 313 err 1 "Unable to setup Bluetooth stack for device ${dev}" 314 fi | 286 bluetooth_device_authentication_enable="0" 287 bluetooth_device_class="ff:01:0c" 288 bluetooth_device_connectable="1" 289 bluetooth_device_discoverable="1" 290 bluetooth_device_encryption_mode="0" 291 bluetooth_device_hci_debug_level="3" 292 bluetooth_device_l2cap_debug_level="3" 293 bluetooth_device_local_name="`/usr/bin/uname -n` (${dev})" --- 13 unchanged lines hidden (view full) --- 307 err 1 "Unable to read Bluetooth device configuration from $_file" 308 fi 309 310 # Setup stack 311 if ! bluetooth_setup_stack ${dev} ${hook} ; then 312 bluetooth_shutdown_stack $dev 313 err 1 "Unable to setup Bluetooth stack for device ${dev}" 314 fi |
315 | 315 |
316 return 0 317} 318 319############################################################################## 320# bluetooth_stop() 321############################################################################## 322 323bluetooth_stop() --- 42 unchanged lines hidden --- | 316 return 0 317} 318 319############################################################################## 320# bluetooth_stop() 321############################################################################## 322 323bluetooth_stop() --- 42 unchanged lines hidden --- |