]> git.pld-linux.org Git - packages/bluez-utils.git/blob - bluez-utils-udev.script
- updated to 3.7
[packages/bluez-utils.git] / bluez-utils-udev.script
1 #!/bin/sh
2 #
3 # bluetooth.sh: udev external RUN script
4 #
5 # Copyright 2005-2006 Henrik Brix Andersen <brix@gentoo.org>
6 # Distributed under the terms of the GNU General Public License v2
7
8 script=/etc/rc.d/init.d/bluetooth
9
10 # Find out where sysfs is mounted. Exit if not available
11 sysfs=`grep -F sysfs /proc/mounts | awk '{print $2}'`
12 if [ "$sysfs" = "" ]; then
13     echo "sysfs is required"
14     exit 1
15 fi
16
17 if [ ! -d $sysfs/class/bluetooth/hci[0-9]* ]; then
18     if $script --quiet status; then
19         $script stop
20     fi
21 else
22     if ! $script --quiet status; then
23         $script start
24     fi
25 fi
This page took 0.064248 seconds and 3 git commands to generate.