diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2007-05-16 12:34:45 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2007-05-16 12:34:45 +0000 |
commit | f11be9da5a0a2e2786e88fbf3d75cddb9abad1d4 (patch) | |
tree | a0a317b6c79a25ed65503ef0b00946fb35add704 /net-wireless/bluez-utils/files | |
parent | Add old-daemons and test-programs local use flags for net-wireless/bluez-utils. (diff) | |
download | gentoo-2-f11be9da5a0a2e2786e88fbf3d75cddb9abad1d4.tar.gz gentoo-2-f11be9da5a0a2e2786e88fbf3d75cddb9abad1d4.tar.bz2 gentoo-2-f11be9da5a0a2e2786e88fbf3d75cddb9abad1d4.zip |
Version bump. A new simpler init script that uses the service architechture so we only need the hcid daemon. Disabled alsa, obex and sync support because upstream says they are not working yet. Added examples use flag to install the echo example service, old-daemons to install the old daemons and test-programs to install l2test and rctest programs. Made the udev helper use IN_HOTPLUG and fix starting the service via udev. Fixes bug #178268, #178210, #178160, #160273 and #144812.
(Portage version: 2.1.2.7)
Diffstat (limited to 'net-wireless/bluez-utils/files')
4 files changed, 75 insertions, 0 deletions
diff --git a/net-wireless/bluez-utils/files/bluez-utils-3.10.1-init.d b/net-wireless/bluez-utils/files/bluez-utils-3.10.1-init.d new file mode 100644 index 000000000000..2e182fe99055 --- /dev/null +++ b/net-wireless/bluez-utils/files/bluez-utils-3.10.1-init.d @@ -0,0 +1,43 @@ +#!/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-3.10.1-init.d,v 1.1 2007/05/16 12:34:45 betelgeuse Exp $ + +depend() { + after coldplug + need dbus localmount +} + +start() { + ebegin "Starting Bluetooth" + local result=0 + HCID_CONFIG="${HCID_CONFIG:-/etc/bluetooth/hcid.conf}" + + if [ -f "${HCID_CONFIG}" ]; then + ebegin " Starting hcid" + # -s enables internal sdp server + start-stop-daemon --start \ + --exec /usr/sbin/hcid -- -s -f "${HCID_CONFIG}" + eend $? + else + eerror "Can't start hcid because HCID_CONFIG is missing." + eend 1 + result=1 + fi + + if [ "${HID2HCI_ENABLE}" = "true" -a -x /usr/sbin/hid2hci ]; then + ebegin " Running hid2hci" + /usr/sbin/hid2hci --tohci -q #be quiet + eend $? + [ "${result}" = "0" ] && result=$? + fi + + eend ${result} +} + +stop() { + ebegin "Shutting down Bluetooth" + + start-stop-daemon --stop --quiet --exec /usr/sbin/hcid + eend $? +} diff --git a/net-wireless/bluez-utils/files/bluez-utils-3.10.1-udev.rules b/net-wireless/bluez-utils/files/bluez-utils-3.10.1-udev.rules new file mode 100644 index 000000000000..775f13471dab --- /dev/null +++ b/net-wireless/bluez-utils/files/bluez-utils-3.10.1-udev.rules @@ -0,0 +1,2 @@ +# Start/Stop bluetooth service on device insertion. Gentoo specific. +SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="bluetooth.sh" diff --git a/net-wireless/bluez-utils/files/bluez-utils-3.10.1-udev.script b/net-wireless/bluez-utils/files/bluez-utils-3.10.1-udev.script new file mode 100644 index 000000000000..de0a967e9913 --- /dev/null +++ b/net-wireless/bluez-utils/files/bluez-utils-3.10.1-udev.script @@ -0,0 +1,27 @@ +#!/bin/sh +# +# bluetooth.sh: udev external RUN script +# +# Copyright: +# 2005-2006 Henrik Brix Andersen <brix@gentoo.org> +# 2007 Petteri Räty <betelgeuse@gentoo.org> +# Distributed under the terms of the GNU General Public License v2 + +script=/etc/init.d/bluetooth + +# Find out where sysfs is mounted. Exit if not available +sysfs=`grep -F sysfs /proc/mounts | awk '{print $2}'` +if [ "$sysfs" = "" ]; then + echo "sysfs is required" + exit 1 +fi + +if [ ! -d $sysfs/class/bluetooth/hci[0-9]* ]; then + if $script --quiet status; then + IN_HOTPLUG=1 $script --quiet stop + fi +else + if ! $script --quiet status; then + IN_HOTPLUG=1 $script --quiet start + fi +fi diff --git a/net-wireless/bluez-utils/files/digest-bluez-utils-3.10.1 b/net-wireless/bluez-utils/files/digest-bluez-utils-3.10.1 new file mode 100644 index 000000000000..ead29ccbf131 --- /dev/null +++ b/net-wireless/bluez-utils/files/digest-bluez-utils-3.10.1 @@ -0,0 +1,3 @@ +MD5 ac3661a2ab9fd40a365e70760abd1093 bluez-utils-3.10.1.tar.gz 803406 +RMD160 1bfafed6f09419dad316be51d286df9c23577c15 bluez-utils-3.10.1.tar.gz 803406 +SHA256 26d5bb455114605537ff9e9c1b2a67b64eddd403de39991085eeb8abe4172024 bluez-utils-3.10.1.tar.gz 803406 |