]> git.pld-linux.org Git - packages/bluez-utils.git/blame - bluez-utils-udev.script
- new
[packages/bluez-utils.git] / bluez-utils-udev.script
CommitLineData
39dd4d91
AM
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
8script=/etc/rc.d/init.d/bluetooth
9
10# Find out where sysfs is mounted. Exit if not available
11sysfs=`grep -F sysfs /proc/mounts | awk '{print $2}'`
12if [ "$sysfs" = "" ]; then
13 echo "sysfs is required"
14 exit 1
15fi
16
17if [ ! -d $sysfs/class/bluetooth/hci[0-9]* ]; then
18 if $script --quiet status; then
19 $script stop
20 fi
21else
22 if ! $script --quiet status; then
23 $script start
24 fi
25fi
This page took 0.047312 seconds and 4 git commands to generate.