Upgrade bluez5_37 :Merge the code from private
[platform/upstream/bluez.git] / packaging / bluez-coldplug.init
1 #! /bin/sh
2 #
3 # /etc/init.d/bluez-coldplug
4 #
5 # Copyright (c) 2009, SUSE Linux Products GmbH Nuernberg, Germany.  All rights reserved.
6 #
7 #
8 ### BEGIN INIT INFO
9 # Provides:             bluez-coldplug
10 # Required-Start:       dbus $remote_fs
11 # Should-Start:         $network $syslog
12 # Required-Stop:        $null
13 # Should-Stop:          $null
14 # Default-Start:        2 3 5
15 # Default-Stop:
16 # Short-Description:
17 # Description: handles udev coldplug of bluetooth dongles
18 ### END INIT INFO
19
20 . /etc/rc.status
21
22 case "$1" in
23         start|restart|try-restart)
24                 udevadm trigger --subsystem-match=bluetooth --action=add
25                 rc_status -v
26                 ;;
27         stop)   
28                 rc_status -v
29                 ;;
30         force-reload|reload)
31                 rc_status -v
32                 ;;
33         status)
34                 rc_status -v
35                 ;;
36         *)
37                 echo "Usage: $0" \
38                      "{start|stop|status|try-restart|restart|force-reload|reload}"
39                 exit 1
40                 ;;
41 esac
42 rc_exit