From 647b0432f2f05ce0596c7333e9e0c0400a6f40f3 Mon Sep 17 00:00:00 2001
From: Michael Hanson <hansonorders@verizon.net>
Date: Sat, 26 Feb 2011 01:55:52 +0000
Subject: runit-scripts: Add run scripts from bluez pkg

---
 abs/core/runit-scripts/PKGBUILD                         |  2 +-
 .../runit-scripts/runitscripts/services/bluetoothd/run  | 12 ++++++++++++
 abs/core/runit-scripts/runitscripts/services/dund/run   | 14 ++++++++++++++
 abs/core/runit-scripts/runitscripts/services/hidd/run   | 14 ++++++++++++++
 abs/core/runit-scripts/runitscripts/services/pand/run   | 14 ++++++++++++++
 abs/core/runit-scripts/runitscripts/services/rfcomm/run | 17 +++++++++++++++++
 6 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 abs/core/runit-scripts/runitscripts/services/bluetoothd/run
 create mode 100644 abs/core/runit-scripts/runitscripts/services/dund/run
 create mode 100644 abs/core/runit-scripts/runitscripts/services/hidd/run
 create mode 100644 abs/core/runit-scripts/runitscripts/services/pand/run
 create mode 100644 abs/core/runit-scripts/runitscripts/services/rfcomm/run

diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD
index d2e6be6..1a62ba3 100755
--- a/abs/core/runit-scripts/PKGBUILD
+++ b/abs/core/runit-scripts/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=runit-scripts
 pkgver=2.1.1
-pkgrel=19
+pkgrel=20
 pkgdesc="collection of startup scripts for runit"
 url="http://smarden.org/runit/"
 license="BSD"
diff --git a/abs/core/runit-scripts/runitscripts/services/bluetoothd/run b/abs/core/runit-scripts/runitscripts/services/bluetoothd/run
new file mode 100644
index 0000000..7a92437
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/bluetoothd/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# Start/stop the Bluetooth daemons
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth
+
+    stat_runit "Starting bluetooth subsystem:"
+      exec /usr/sbin/bluetoothd -n
diff --git a/abs/core/runit-scripts/runitscripts/services/dund/run b/abs/core/runit-scripts/runitscripts/services/dund/run
new file mode 100644
index 0000000..c42cfa1
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/dund/run
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Start/stop the Bluetooth daemons
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth
+
+svwaitup -s 3 /var/service/bluetoothd || exit 1
+
+    stat_runit "Starting BlueZ Bluetooth dial-up networking daemon"
+      exec /usr/bin/dund -n -s
diff --git a/abs/core/runit-scripts/runitscripts/services/hidd/run b/abs/core/runit-scripts/runitscripts/services/hidd/run
new file mode 100644
index 0000000..e4f66d3
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/hidd/run
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Start/stop the Bluetooth daemons
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth
+
+svwaitup -s 3 /var/service/bluetoothd || exit 1
+
+    stat_runit "Starting Bluetooth HID daemon:"
+      exec /usr/bin/hidd -n --server
diff --git a/abs/core/runit-scripts/runitscripts/services/pand/run b/abs/core/runit-scripts/runitscripts/services/pand/run
new file mode 100644
index 0000000..ab15ef6
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/pand/run
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Start/stop the Bluetooth daemons
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth
+
+svwaitup -s 3 /var/service/bluetoothd || exit 1
+
+    stat_runit "Starting BlueZ Bluetooth PAN daemon"
+      exec /usr/bin/pand -n -s
diff --git a/abs/core/runit-scripts/runitscripts/services/rfcomm/run b/abs/core/runit-scripts/runitscripts/services/rfcomm/run
new file mode 100644
index 0000000..8bc619b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/rfcomm/run
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Start/stop the Bluetooth daemons
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth
+
+RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
+
+svwaitup -s 3 /var/service/bluetoothd || exit 1
+
+    stat_runit "Starting RFCOMM for the bluetooth subsystem"
+      /usr/bin/rfcomm -f $RFCOMM_CONFIG bind all
+      /sbin/sv down .
-- 
cgit v0.12