#!/bin/sh # # bluetooth.sh: udev external RUN script # # Copyright 2005 Henrik Brix Andersen # Distributed under the terms of the GNU General Public License v2 script=/etc/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 $script stop else $script start fi