]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/init.d/bluetooth
2 # Begin $rc_base/init.d/bluetooth
4 # Based on sysklogd script from LFS-3.1 and earlier.
5 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
10 eval $
(/usr
/local
/bin
/readhash
/var
/ipfire
/bluetooth
/settings
)
14 boot_mesg
"Starting Bluetooth daemon..."
15 loadproc
/usr
/sbin
/hcid
18 if [ "$PASSKEY_AGENT" == "on" ]; then
19 boot_mesg
"Starting Bluetooth passkey-agent..."
20 loadproc
/usr
/bin
/passkey-agent
--default $PWD &
23 if [ "$RFCOMM0_BIND" == "on" ]; then
24 boot_mesg
"Bind rfcomm0 to cellphone/modem ${RFCOMM0_DEVICE//-/:}/$RFCOMM0_CHANNEL ..."
25 rfcomm
bind /dev
/rfcomm0
${RFCOMM0_DEVICE//-/:} $RFCOMM0_CHANNEL
28 if [ "$RFCOMM1_BIND" == "on" ]; then
29 boot_mesg
"Bind rfcomm1 to cellphone/modem ${RFCOMM1_DEVICE//-/:}/${RFCOMM1_CHANNEL} ..."
30 rfcomm
bind /dev
/rfcomm1
${RFCOMM1_DEVICE//-/:} $RFCOMM1_CHANNEL
38 if [ -e /dev
/rfcomm0
]; then
39 boot_mesg
"Release rfcomm0..."
40 rfcomm release rfcomm0
42 if [ -e /dev
/rfcomm1
]; then
43 boot_mesg
"Release rfcomm1..."
44 rfcomm release rfcomm1
46 boot_mesg
"Stopping Bluetooth daemon..."
47 killproc
/usr
/sbin
/hcid
58 statusproc
/usr
/sbin
/hcid
59 statusproc
/usr
/bin
/passkey-agent
63 echo "Usage: $0 {start|stop|restart|status}"
68 # End $rc_base/init.d/bluetooth