3 # bluetooth Bluetooth subsystem starting and stopping. Turn HID adapters into Bluetooth ones.
7 # description: Bluetooth subsystem
12 # Source function library
13 . /etc/rc.d/init.d/functions
15 [ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
18 # Check if the service is already running?
19 if [ -f /var/lock/subsys/bluetooth ]; then
20 msg_already_running bluetooth
24 if [ ! -x /sbin/udevadm ]; then
28 msg_starting "Bluetooth devices"
29 daemon /sbin/udevadm trigger --subsystem-match=bluetooth --action=add
31 touch /var/lock/subsys/bluetooth
35 if [ ! -f /var/lock/subsys/bluetooth ]; then
36 msg_not_running bluetooth
40 # nothing needed to stop it
41 rm -f /var/lock/subsys/bluetooth
45 if [ ! -f /var/lock/subsys/bluetooth ]; then
46 msg_not_running bluetooth
56 if [ ! -f /var/lock/subsys/bluetooth ]; then
57 msg_not_running bluetooth
62 nls "bluetooth is running"
66 # See how we were called.
74 restart|reload|force-reload)
86 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"