diff options
author | Alastair Tse <liquidx@gentoo.org> | 2006-02-07 14:04:40 +0000 |
---|---|---|
committer | Alastair Tse <liquidx@gentoo.org> | 2006-02-07 14:04:40 +0000 |
commit | 3a6d0ac93300e25915e105a085af86cc2d9834f2 (patch) | |
tree | d020bb45d25d7a5a07b84f50524ee2e667eaa06f /net-wireless/bluez-utils/files | |
parent | Version bump. (diff) | |
download | gentoo-2-3a6d0ac93300e25915e105a085af86cc2d9834f2.tar.gz gentoo-2-3a6d0ac93300e25915e105a085af86cc2d9834f2.tar.bz2 gentoo-2-3a6d0ac93300e25915e105a085af86cc2d9834f2.zip |
version bump. added comment about net-dialup/ppp needed for dund. made
bluetooth run after dbus has started to take advantage of dbus if available.
(#118786) (#120759)
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'net-wireless/bluez-utils/files')
-rw-r--r-- | net-wireless/bluez-utils/files/bluez-utils-2.25-init.d | 141 | ||||
-rw-r--r-- | net-wireless/bluez-utils/files/digest-bluez-utils-2.25 | 1 |
2 files changed, 142 insertions, 0 deletions
diff --git a/net-wireless/bluez-utils/files/bluez-utils-2.25-init.d b/net-wireless/bluez-utils/files/bluez-utils-2.25-init.d new file mode 100644 index 000000000000..30105f0d9165 --- /dev/null +++ b/net-wireless/bluez-utils/files/bluez-utils-2.25-init.d @@ -0,0 +1,141 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/files/bluez-utils-2.25-init.d,v 1.1 2006/02/07 14:04:40 liquidx Exp $ + +UART_CONF="/etc/bluetooth/uart" + +depend() { + after coldplug + after dbus +} + +start_uarts() { + [ -f /usr/sbin/hciattach -a -f ${UART_CONF} ] || return + grep -v '^#' ${UART_CONF} | while read i; do + /usr/sbin/hciattach $i + done +} + +stop_uarts() { + killall hciattach > /dev/null 2>&1 +} + +start() { + ebegin "Starting Bluetooth" + + if [ "${HID2HCI_ENABLE}" = "true" -a -x /usr/sbin/hid2hci ]; then + ebegin " Running hid2hci" + /usr/sbin/hid2hci -0 -q #be quiet + /bin/sleep 1 # delay for hid's to be detected by hotplug + eend $? + fi + + if [ "${HCID_ENABLE}" = "true" -a -x /usr/sbin/hcid ]; then + if [ -f "${HCID_CONFIG}" ]; then + ebegin " Starting hcid" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/hcid -- -f $HCID_CONFIG + eend $? + else + ewarn "Not enabling hcid because HCID_CONFIG is missing." + fi + fi + + if [ "${SDPD_ENABLE}" = "true" -a -x /usr/sbin/sdpd ]; then + ebegin " Starting sdpd" + start-stop-daemon --start --quiet --exec /usr/sbin/sdpd + eend $? + fi + + if [ "${HIDD_ENABLE}" = "true" -a -x /usr/bin/hidd ]; then + ebegin " Starting hidd" + start-stop-daemon --start --quiet \ + --exec /usr/bin/hidd -- ${HIDD_OPTIONS} --server + eend $? + fi + + if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then + if [ -f "${RFCOMM_CONFIG}" ]; then + ebegin " Starting rfcomm" + /usr/bin/rfcomm -f ${RFCOMM_CONFIG} bind all + eend $? + else + ewarn "Not enabling rfcomm because RFCOMM_CONFIG does not exists" + fi + fi + + if [ "${DUND_ENABLE}" = "true" -a -x /usr/bin/dund ]; then + if [ -n "${DUND_OPTIONS}" ]; then + ebegin " Starting dund" + start-stop-daemon --start --quiet \ + --exec /usr/bin/dund -- ${DUND_OPTIONS} + eend $? + else + ewarn "Not starting dund because DUND_OPTIONS not defined." + fi + fi + + if [ "${PAND_ENABLE}" = "true" -a -x /usr/bin/pand ]; then + if [ -n "${PAND_OPTIONS}" ]; then + ebegin " Starting pand" + start-stop-daemon --start --quiet \ + --exec /usr/bin/pand -- ${PAND_OPTIONS} + eend $? + else + ewarn "Not starting pand because PAND_OPTIONS not defined." + fi + fi + + start_uarts + eend 0 +} + +stop() { + ebegin "Shutting down Bluetooth" + + if [ "${PAND_ENABLE}" = "true" -a -x /usr/bin/pand ]; then + ebegin " Stopping pand" + start-stop-daemon --stop --quiet --exec /usr/bin/pand + eend $? + fi + + if [ "${DUND_ENABLE}" = "true" -a -x /usr/bin/dund ]; then + ebegin " Stopping dund" + start-stop-daemon --stop --quiet --exec /usr/bin/dund + eend $? + fi + + if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then + ebegin " Stopping rfcomm" + /usr/bin/rfcomm release all + eend $? + fi + + if [ "${HIDD_ENABLE}" = "true" -a -x /usr/bin/hidd ]; then + ebegin " Stopping hidd" + start-stop-daemon --stop --quiet --exec /usr/bin/hidd + eend $? + fi + + + if [ "${SDPD_ENABLE}" = "true" -a -x /usr/sbin/sdpd ]; then + ebegin " Stopping sdpd" + start-stop-daemon --stop --quiet --exec /usr/sbin/sdpd + eend $? + fi + + if [ "${HCID_ENABLE}" = "true" -a -x /usr/sbin/hcid ]; then + ebegin " Stopping hcid" + start-stop-daemon --stop --quiet --exec /usr/sbin/hcid + eend $? + fi + + stop_uarts + eend 0 +} + +restart() { + svc_stop + svc_start +} diff --git a/net-wireless/bluez-utils/files/digest-bluez-utils-2.25 b/net-wireless/bluez-utils/files/digest-bluez-utils-2.25 new file mode 100644 index 000000000000..ac0e4e5e6214 --- /dev/null +++ b/net-wireless/bluez-utils/files/digest-bluez-utils-2.25 @@ -0,0 +1 @@ +MD5 ae3729ab5592be06ed01b973d4b3e9fe bluez-utils-2.25.tar.gz 592073 |