]> git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/init.d/bluetooth
Add blootooth stack and experimental bluetooth cellphone/modem for red
[ipfire-2.x.git] / src / initscripts / init.d / bluetooth
1 #!/bin/sh
2 # Begin $rc_base/init.d/bluetooth
3
4 # Based on sysklogd script from LFS-3.1 and earlier.
5 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
6
7 . /etc/sysconfig/rc
8 . $rc_functions
9
10 case "$1" in
11 start)
12 boot_mesg "Starting Bluetooth daemon..."
13 loadproc /usr/sbin/hcid
14 sleep 1
15
16 # The passkey-agent is only needed for pairing
17 #boot_mesg "Starting Bluetooth passkey-agent..."
18 #loadproc /usr/bin/passkey-agent --default 12345 &
19
20 # Bind rfcomm to a blootooth cellphone/modem
21 #boot_mesg "Bind rfcomm0 to cellphone/modem..."
22 #rfcomm bind /dev/rfcomm0 00:11:22:33:44:55 1
23 #evaluate_retval
24 ;;
25
26 stop)
27 #boot_mesg "Realease rfcomm0..."
28 #rfcomm release rfcomm0
29 #boot_mesg "Stopping Bluetooth passkey-agent..."
30 #killproc /usr/bin/passkey-agent
31 boot_mesg "Stopping Bluetooth daemon..."
32 killproc /usr/sbin/hcid
33 ;;
34
35 restart)
36 $0 stop
37 sleep 1
38 $0 start
39 ;;
40
41 status)
42 statusproc /usr/sbin/hcid
43 statusproc /usr/bin/passkey-agent
44
45 ;;
46
47 *)
48 echo "Usage: $0 {start|stop|restart|status}"
49 exit 1
50 ;;
51 esac
52
53 # End $rc_base/init.d/bluetooth