]> git.pld-linux.org Git - packages/bluez-utils.git/commitdiff
- new
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 28 Apr 2006 18:45:04 +0000 (18:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bluez-utils-udev.rules -> 1.1
    bluez-utils-udev.script -> 1.1

bluez-utils-udev.rules [new file with mode: 0644]
bluez-utils-udev.script [new file with mode: 0644]

diff --git a/bluez-utils-udev.rules b/bluez-utils-udev.rules
new file mode 100644 (file)
index 0000000..f4affad
--- /dev/null
@@ -0,0 +1,3 @@
+# Bluetooth devices:
+#
+KERNEL=="hci[0-9]*", RUN+="/lib/udev/bluetooth.sh"
diff --git a/bluez-utils-udev.script b/bluez-utils-udev.script
new file mode 100644 (file)
index 0000000..1f879bd
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# bluetooth.sh: udev external RUN script
+#
+# Copyright 2005-2006 Henrik Brix Andersen <brix@gentoo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+script=/etc/rc.d/init.d/bluetooth
+
+# Find out where sysfs is mounted. Exit if not available
+sysfs=`grep -F sysfs /proc/mounts | awk '{print $2}'`
+if [ "$sysfs" = "" ]; then
+    echo "sysfs is required"
+    exit 1
+fi
+
+if [ ! -d $sysfs/class/bluetooth/hci[0-9]* ]; then
+    if $script --quiet status; then
+       $script stop
+    fi
+else
+    if ! $script --quiet status; then
+       $script start
+    fi
+fi
This page took 0.069491 seconds and 4 git commands to generate.