summaryrefslogtreecommitdiffstats
path: root/testing/bluez/bluetooth-init.d
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-05-19 08:02:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-05-19 08:02:28 +0000
commit80b81a91d09812b6ff99c9cb1cd93f757327bc8c (patch)
tree15935bdb13efa85efb00919cd4ed0c4e9d353a57 /testing/bluez/bluetooth-init.d
parent1c6f938da5885d7c1390baac9f2e3d8deaf0c641 (diff)
testing/bluez: added init.d script
Diffstat (limited to 'testing/bluez/bluetooth-init.d')
-rw-r--r--testing/bluez/bluetooth-init.d31
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/bluez/bluetooth-init.d b/testing/bluez/bluetooth-init.d
new file mode 100644
index 00000000000..111902aaeb5
--- /dev/null
+++ b/testing/bluez/bluetooth-init.d
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/files/4.60/bluetooth-init.d,v 1.1 2010/02/01 19:47:46 pacho Exp $
+
+depend() {
+ after coldplug
+ need dbus localmount
+}
+
+start() {
+ ebegin "Starting Bluetooth"
+
+ udevadm trigger --subsystem-match=bluetooth
+ eend $?
+
+ if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then
+ if [ -f "${RFCOMM_CONFIG}" ]; then
+ ebegin " Starting rfcomm"
+ /usr/bin/rfcomm -f "${RFCOMM_CONFIG}" bind all
+ eend $?
+ else
+ ewarn "Not enabling rfcomm because RFCOMM_CONFIG does not exists"
+ fi
+ fi
+}
+
+stop() {
+ ebegin "Shutting down Bluetooth"
+ eend 0
+}