+++ /dev/null
---- bluez-4.40/scripts/Makefile.am~ 2009-05-19 11:04:10.000000000 +0200
-+++ bluez-4.40/scripts/Makefile.am 2009-05-24 18:35:37.159621106 +0200
-@@ -1,6 +1,6 @@
-
- if CONFIGFILES
--rulesdir = $(sysconfdir)/udev
-+rulesdir = $(sysconfdir)/udev/rules.d
-
- rules_DATA =
-
-@@ -14,7 +14,7 @@
- endif
-
- if PCMCIARULES
--udevdir = $(libexecdir)/udev
-+udevdir = $(libexecdir)/udev/rules.d
-
- udev_SCRIPTS = bluetooth_serial
- endif
+++ /dev/null
-# Bluetooth devices:
-#
-KERNEL=="hci[0-9]*", RUN+="/lib/udev/bluetooth.sh"
+++ /dev/null
-#!/bin/sh
-#
-# bluetooth.sh: udev external RUN script
-#
-# Copyright 2005-2006 Henrik Brix Andersen <brix@gentoo.org>
-# Distributed under the terms of the GNU General Public License v2
-
-script=/etc/rc.d/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 status; then
- $script stop
- fi
-else
- if ! $script status; then
- $script start
- fi
-fi
#
# bluetooth Bluetooth subsystem starting and stopping
#
-# chkconfig: 345 25 90
+# chkconfig: 345 50 83
#
# description: Bluetooth subsystem
#
# Source function library
. /etc/rc.d/init.d/functions
-UART_CONF="/etc/bluetooth/uart"
[ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
-if [ "$UART_CONF" != "no" -a ! -f "$UART_CONF" ]; then
- UART_CONF="no"
-fi
-
start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/bluetooth ]; then
- if is_yes "${DAEMON_ENABLE}" && [ -x /usr/sbin/bluetoothd ]; then
- msg_starting bluetooth
- daemon /usr/sbin/bluetoothd
- RETVAL=$?
- fi
-
- if is_yes "${HID2HCI_ENABLE}" && [ -x /usr/sbin/hid2hci ]; then
- msg_starting hid2hci
- daemon /usr/sbin/hid2hci -0 -q # be quiet
- RETVAL=$?
- /bin/sleep 1 # delay for hid's to be detected by hotplug
- fi
-
- if is_yes "${HIDD_ENABLE}" && [ -x /usr/bin/hidd ]; then
- msg_starting hidd
- daemon /usr/bin/hidd ${HIDD_OPTIONS} --server
- RETVAL=$?
- fi
-
- if is_yes "${RFCOMM_ENABLE}" && [ -x /usr/bin/rfcomm ]; then
- msg_starting rfcomm
- daemon /usr/bin/rfcomm -f /etc/bluetooth/rfcomm.conf bind all
- RETVAL=$?
- fi
-
- if is_yes "${DUND_ENABLE}" && [ -x /usr/bin/dund ]; then
- msg_starting dund
- daemon /usr/bin/dund ${DUND_OPTIONS}
- RETVAL=$?
- fi
-
- if is_yes "${PAND_ENABLE}" && [ -x /usr/bin/pand ]; then
- msg_starting pand
- daemon /usr/bin/pand ${PAND_OPTIONS}
- RETVAL=$?
- fi
-
- if [ -f /usr/sbin/hciattach -a "$UART_CONF" != "no" ]; then
- grep -v '^#' $UART_CONF | while read i; do
- /usr/sbin/hciattach $i
- done
- fi
+ msg_starting hid2hci
+ daemon /usr/sbin/hid2hci -q -r hci
+ RETVAL=$?
+ /bin/sleep 1 # delay for hid's to be detected by hotplug
touch /var/lock/subsys/bluetooth
else
msg_already_running bluetooth
stop() {
if [ -f /var/lock/subsys/bluetooth ]; then
- if is_yes "${PAND_ENABLE}" && [ -x /usr/bin/pand ]; then
- msg_stopping pand
- killproc /usr/bin/pand
- fi
-
- if is_yes "${DUND_ENABLE}" && [ -x /usr/bin/dund ]; then
- msg_stopping dund
- killproc /usr/bin/dund
- fi
-
- if is_yes "${RFCOMM_ENABLE}" && [ -x /usr/bin/rfcomm ]; then
- msg_stopping rfcomm
- daemon /usr/bin/rfcomm release all
- fi
-
- if is_yes "${HIDD_ENABLE}" && [ -x /usr/bin/hidd ]; then
- msg_stopping hidd
- killproc /usr/bin/hidd
- fi
-
- if is_yes "${DAEMON_ENABLE}" && [ -x /usr/sbin/bluetoothd ]; then
- msg_stopping bluetooth
- killproc /usr/sbin/bluetoothd
- fi
-
- if [ "$UART_CONF" != "no" ]; then
- killproc hciattach >/dev/null 2>&1
- fi
+ msg_stopping hid2hci
+ daemon /usr/sbin/hid2hci -q -r hid
rm -f /var/lock/subsys/bluetooth
else
msg_not_running bluetooth
stop)
stop
;;
- restart)
+ restart|reload|force-reload)
stop
start
;;
try-restart)
condrestart 0
;;
- reload|force-reload)
- if [ -f /var/lock/subsys/bluetooth ]; then
- msg_reloading bluetoothd
- killproc bluetoothd -HUP
- RETVAL=$?
- else
- msg_not_running bluetooth
- exit 7
- fi
- ;;
status)
- is_yes "${HID2HCI_ENABLE}" && status hid2hci
- is_yes "${HCID_ENABLE}" && status bluetoothd
- is_yes "${HIDD_ENABLE}" && status hidd
- is_yes "${DUND_ENABLE}" && status dund
- is_yes "${PAND_ENABLE}" && status pand
if [ -f /var/lock/subsys/bluetooth ]; then
exit 0
else
Summary: Bluetooth utilities
Summary(pl.UTF-8): Narzędzia Bluetooth
Name: bluez
-Version: 4.45
-Release: 1
+Version: 4.47
+Release: 2
License: GPL v2+
Group: Applications/System
#Source0Download: http://www.bluez.org/download.html
Source0: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
-# Source0-md5: fb1a02a8008326eabe383dc6fb01b05d
+# Source0-md5: b54a199004b578ec5652014a5e62aeaa
Source1: %{name}.init
Source2: %{name}.sysconfig
-Source3: %{name}-udev.rules
-Source4: %{name}-udev.script
+Source3: dund.init
+Source4: pand.init
+Source5: rfcomm.init
Patch0: %{name}-etc_dir.patch
Patch2: %{name}-wacom-mode-2.patch
URL: http://www.bluez.org/
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
-install -d $RPM_BUILD_ROOT{/etc/udev/rules.d,%{udevdir}}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
cupsdir=%{cupsdir} \
udevdir=%{udevdir}
-# noinst
-install audio/audio.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
-install input/input.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
-install network/network.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
-
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/udev/rules.d/bluetooth.rules
-install %{SOURCE4} $RPM_BUILD_ROOT%{udevdir}/bluetooth.sh
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/dund
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/pand
+install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/rfcomm
rm -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/*.{,l}a
rm -f $RPM_BUILD_ROOT%{_libdir}/bluetooth/plugins/*.{,l}a
rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer*/libgstbluetooth.{,l}a
%post
/sbin/chkconfig --add bluetooth
+/sbin/chkconfig --add dund
+/sbin/chkconfig --add pand
+/sbin/chkconfig --add rfcomm
%service bluetooth restart
+%service dund restart
+%service pand restart
+%service rfcomm restart
%preun
if [ "$1" = "0" ]; then
%service bluetooth stop
+ %service dund stop
+ %service pand stop
+ %service rfcomm stop
/sbin/chkconfig --del bluetooth
+ /sbin/chkconfig --del dund
+ /sbin/chkconfig --del pand
+ /sbin/chkconfig --del rfcomm
fi
%post libs -p /sbin/ldconfig
%dir %{_libdir}/bluetooth/plugins
%attr(755,root,root) %{_libdir}/bluetooth/plugins/*.so
%dir %{_sysconfdir}/bluetooth
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/audio.conf
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/main.conf
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/rfcomm.conf
%attr(754,root,root) /etc/rc.d/init.d/bluetooth
+%attr(754,root,root) /etc/rc.d/init.d/dund
+%attr(754,root,root) /etc/rc.d/init.d/pand
+%attr(754,root,root) /etc/rc.d/init.d/rfcomm
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
-%attr(755,root,root) %{udevdir}/bluetooth.sh
%attr(755,root,root) %{udevdir}/bluetooth_serial
-%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/bluetooth.rules
-%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/97-bluetooth.rules
-%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/97-bluetooth-hid2hci.rules
-%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/97-bluetooth-serial.rules
+%config(noreplace) %verify(not md5 mtime size) %{udevdir}/rules.d/97-bluetooth.rules
+%config(noreplace) %verify(not md5 mtime size) %{udevdir}/rules.d/97-bluetooth-hid2hci.rules
+%config(noreplace) %verify(not md5 mtime size) %{udevdir}/rules.d/97-bluetooth-serial.rules
%{_mandir}/man[18]/*
%files -n alsa-plugins-bluetooth
--- /dev/null
+#!/bin/sh
+#
+# dund Bluetooth Dial-Up-Networking Daemon
+#
+# chkconfig: 345 26 89
+#
+# description: Bluetooth Dial-Up-Networking Daemon. Provides PPP over RFCOMM services.
+#
+# $Id$
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+[ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
+
+is_no "${NETWORKING}" && exit 0
+
+start() {
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/dund ]; then
+ msg_starting dund
+ daemon /usr/bin/dund ${DUND_OPTIONS}
+ RETVAL=$?
+ touch /var/lock/subsys/dund
+ else
+ msg_already_running dund
+ fi
+}
+
+stop() {
+ if [ -f /var/lock/subsys/dund ]; then
+ msg_stopping dund
+ killproc /usr/bin/dund
+ rm -f /var/lock/subsys/dund
+ else
+ msg_not_running dund
+ fi
+}
+
+condrestart() {
+ if [ -f /var/lock/subsys/dund ]; then
+ stop
+ start
+ else
+ msg_not_running dund
+ RETVAL=$1
+ fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload|force-reload)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ status)
+ if [ -f /var/lock/subsys/dund ]; then
+ exit 0
+ else
+ exit 1
+ fi
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL
--- /dev/null
+#!/bin/sh
+#
+# pand Bluetooth Personal Area Networking Daemon
+#
+# chkconfig: 345 26 89
+#
+# description: Bluetooth Personal Area Networking Daemon. Provides network services over Bluetooth.
+#
+# $Id$
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+. /etc/sysconfig/network
+
+[ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
+
+is_no "${NETWORKING}" && exit 0
+
+start() {
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/pand ]; then
+ msg_starting pand
+ daemon /usr/bin/pand ${PAND_OPTIONS}
+ RETVAL=$?
+ touch /var/lock/subsys/pand
+ else
+ msg_already_running pand
+ fi
+}
+
+stop() {
+ if [ -f /var/lock/subsys/pand ]; then
+ msg_stopping pand
+ killproc /usr/bin/pand
+ rm -f /var/lock/subsys/pand
+ else
+ msg_not_running pand
+ fi
+}
+
+condrestart() {
+ if [ -f /var/lock/subsys/pand ]; then
+ stop
+ start
+ else
+ msg_not_running pand
+ RETVAL=$1
+ fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload|force-reload)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ status)
+ status pand
+ if [ -f /var/lock/subsys/pand ]; then
+ exit 0
+ else
+ exit 1
+ fi
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL
--- /dev/null
+#!/bin/sh
+#
+# rfcomm Bluetooth RFCOMM setup. Sets up serial devices over Bluetooth.
+#
+# chkconfig: 345 27 88
+#
+# description: Bluetooth RFCOMM setup
+#
+# $Id$
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+UART_CONF="/etc/bluetooth/uart"
+[ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
+
+if [ "$UART_CONF" != "no" -a ! -f "$UART_CONF" ]; then
+ UART_CONF="no"
+fi
+
+start() {
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/rfcomm ]; then
+ msg_starting rfcomm
+ daemon /usr/bin/rfcomm -f /etc/bluetooth/rfcomm.conf bind all
+ RETVAL=$?
+ touch /var/lock/subsys/rfcomm
+ else
+ msg_already_running rfcomm
+ fi
+}
+
+stop() {
+ if [ -f /var/lock/subsys/rfcomm ]; then
+ msg_stopping rfcomm
+ daemon /usr/bin/rfcomm release all
+ rm -f /var/lock/subsys/rfcomm
+ else
+ msg_not_running bluetooth
+ fi
+}
+
+condrestart() {
+ if [ -f /var/lock/subsys/rfcomm ]; then
+ stop
+ start
+ else
+ msg_not_running rfcomm
+ RETVAL=$1
+ fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload|force-reload)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ status)
+ if [ -f /var/lock/subsys/rfcomm ]; then
+ exit 0
+ else
+ exit 1
+ fi
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL