summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/bluetooth
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-12-31 10:37:18 +0000
committeryar <yar@FreeBSD.org>2006-12-31 10:37:18 +0000
commitdc9f8423c3772111565181a8568c60c4da0a1689 (patch)
tree7ed36d4fe8965c59b37bcccfa387cf77469cbeef /etc/rc.d/bluetooth
parent58a4c67f05bc56e76c61ca19ed42f2e412cfd55f (diff)
downloadFreeBSD-src-dc9f8423c3772111565181a8568c60c4da0a1689.zip
FreeBSD-src-dc9f8423c3772111565181a8568c60c4da0a1689.tar.gz
Use $required_modules wherever suitable. Use load_kld() in special
cases. So we get rid of quite a few lines of duplicated code.
Diffstat (limited to 'etc/rc.d/bluetooth')
-rw-r--r--etc/rc.d/bluetooth9
1 files changed, 2 insertions, 7 deletions
diff --git a/etc/rc.d/bluetooth b/etc/rc.d/bluetooth
index c48af64..cfcf104 100644
--- a/etc/rc.d/bluetooth
+++ b/etc/rc.d/bluetooth
@@ -36,6 +36,7 @@ name="bluetooth"
rcvar=
start_cmd="bluetooth_start"
stop_cmd="bluetooth_stop"
+required_modules="ng_bluetooth ng_hci ng_l2cap ng_btsocket"
##############################################################################
# Read and parse Bluetooth device configuration file
@@ -231,17 +232,11 @@ bluetooth_start()
dev=$1
- # Automatically load modules
- kldload ng_bluetooth > /dev/null 2>&1
- kldload ng_hci > /dev/null 2>&1
- kldload ng_l2cap > /dev/null 2>&1
- kldload ng_btsocket > /dev/null 2>&1
-
# Try to figure out device type by looking at device name
case "${dev}" in
# sioX - serial/UART Bluetooth device
sio*)
- kldload ng_h4 > /dev/null 2>&1
+ load_kld ng_h4 || return 1
hook="hook"
OpenPOWER on IntegriCloud