Gentoo Archives: gentoo-commits

From: "Tiziano Mueller (dev-zero)" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-wireless/bluez/files: bluez-4.18-udev.rules bluez-4.18-udev.script
Date: Fri, 28 Nov 2008 21:21:39
Message-Id: E1L6AmO-0007GS-32@stork.gentoo.org
1 dev-zero 08/11/28 21:21:36
2
3 Added: bluez-4.18-udev.rules bluez-4.18-udev.script
4 Log:
5 Initial commit, keeping the keywords the same as for bluez-libs/-utils since it's mostly the same. Most patches are taken from bluez-libs/-utils. (bug #236357)
6 (Portage version: 2.2_rc16/cvs/Linux 2.6.27.5 x86_64)
7
8 Revision Changes Path
9 1.1 net-wireless/bluez/files/bluez-4.18-udev.rules
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-wireless/bluez/files/bluez-4.18-udev.rules?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-wireless/bluez/files/bluez-4.18-udev.rules?rev=1.1&content-type=text/plain
13
14 Index: bluez-4.18-udev.rules
15 ===================================================================
16 # Start/Stop bluetooth service on device insertion. Gentoo specific.
17 SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="bluetooth.sh"
18
19 # So that normal users can dial out.
20 SUBSYSTEM=="tty", SUBSYSTEMS=="bluetooth", GROUP="uucp"
21
22
23
24 1.1 net-wireless/bluez/files/bluez-4.18-udev.script
25
26 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-wireless/bluez/files/bluez-4.18-udev.script?rev=1.1&view=markup
27 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-wireless/bluez/files/bluez-4.18-udev.script?rev=1.1&content-type=text/plain
28
29 Index: bluez-4.18-udev.script
30 ===================================================================
31 #!/bin/sh
32 #
33 # bluetooth.sh: udev external RUN script
34 #
35 # Copyright:
36 # 2005-2006 Henrik Brix Andersen <brix@g.o>
37 # 2007 Petteri Räty <betelgeuse@g.o>
38 # 2008 Tiziano Müller <dev-zero@g.o>
39 # Distributed under the terms of the GNU General Public License v2
40
41 script=/etc/init.d/bluetooth
42
43 # Find out where sysfs is mounted. Exit if not available
44 sysfs=`grep -F sysfs /proc/mounts | awk '{print $2}'`
45 if [ "$sysfs" = "" ]; then
46 echo "sysfs is required"
47 exit 1
48 fi
49
50 if [ ! -d $sysfs/class/bluetooth/hci[0-9]* -a ! -d $sysfs/bus/bluetooth/devices/hci[0-9]* ]; then
51 if $script --quiet status; then
52 IN_HOTPLUG=1 $script --quiet stop
53 fi
54 else
55 if ! $script --quiet status; then
56 IN_HOTPLUG=1 $script --quiet start
57 fi
58 fi