Add blootooth stack and experimental bluetooth cellphone/modem for red

This commit is contained in:
Arne Fitzenreiter
2008-08-13 05:57:37 +02:00
parent 5f785e716c
commit 2c1b94f009
15 changed files with 689 additions and 73 deletions

View File

@@ -0,0 +1,53 @@
#!/bin/sh
# Begin $rc_base/init.d/bluetooth
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
. /etc/sysconfig/rc
. $rc_functions
case "$1" in
start)
boot_mesg "Starting Bluetooth daemon..."
loadproc /usr/sbin/hcid
sleep 1
# The passkey-agent is only needed for pairing
#boot_mesg "Starting Bluetooth passkey-agent..."
#loadproc /usr/bin/passkey-agent --default 12345 &
# Bind rfcomm to a blootooth cellphone/modem
#boot_mesg "Bind rfcomm0 to cellphone/modem..."
#rfcomm bind /dev/rfcomm0 00:11:22:33:44:55 1
#evaluate_retval
;;
stop)
#boot_mesg "Realease rfcomm0..."
#rfcomm release rfcomm0
#boot_mesg "Stopping Bluetooth passkey-agent..."
#killproc /usr/bin/passkey-agent
boot_mesg "Stopping Bluetooth daemon..."
killproc /usr/sbin/hcid
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/hcid
statusproc /usr/bin/passkey-agent
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/bluetooth

View File

@@ -0,0 +1,45 @@
#!/bin/sh
# Begin $rc_base/init.d/messagebus
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
#$LastChangedBy: dnicholson $
#$Date: 2007-10-21 11:33:30 -0500 (Sun, 21 Oct 2007) $
. /etc/sysconfig/rc
. $rc_functions
pidfile=/var/run/dbus/pid
socket=/var/run/dbus/system_bus_socket
case "$1" in
start)
boot_mesg "Starting the D-Bus Messagebus Daemon..."
/usr/bin/dbus-uuidgen --ensure
loadproc -p "$pidfile" /usr/bin/dbus-daemon --system
;;
stop)
boot_mesg "Stopping the D-Bus Messagebus Daemon..."
killproc -p "$pidfile" /usr/bin/dbus-daemon
[ $? -eq 0 ] && rm -f "$socket"
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc -p $pidfile /usr/bin/dbus-daemon
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/messagebus