]> git.pld-linux.org Git - packages/bluez.git/commitdiff
- rel 2; init scripts into separate files auto/ti/bluez-4_47-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 4 Aug 2009 19:13:20 +0000 (19:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bluez-udev-path.patch -> 1.2
    bluez-udev.rules -> 1.2
    bluez-udev.script -> 1.2
    bluez.init -> 1.5
    bluez.spec -> 1.31
    dund.init -> 1.1
    pand.init -> 1.1
    rfcomm.init -> 1.1

bluez-udev-path.patch [deleted file]
bluez-udev.rules [deleted file]
bluez-udev.script [deleted file]
bluez.init
bluez.spec
dund.init [new file with mode: 0644]
pand.init [new file with mode: 0644]
rfcomm.init [new file with mode: 0644]

diff --git a/bluez-udev-path.patch b/bluez-udev-path.patch
deleted file mode 100644 (file)
index f744b75..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- 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
diff --git a/bluez-udev.rules b/bluez-udev.rules
deleted file mode 100644 (file)
index f4affad..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Bluetooth devices:
-#
-KERNEL=="hci[0-9]*", RUN+="/lib/udev/bluetooth.sh"
diff --git a/bluez-udev.script b/bluez-udev.script
deleted file mode 100644 (file)
index 62db14a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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
index ec8fbf8a07e91c328531dca55072ed25b5af4357..7fdee4929b09572c62964defbe053ce0afc5ce07 100644 (file)
@@ -2,7 +2,7 @@
 #
 # 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
@@ -72,34 +29,8 @@ start() {
 
 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
@@ -125,29 +56,14 @@ case "$1" in
   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
index 71b83fd6517e2503204c90609c4de1c75de729e9..a5496ee0754f6724d343fc617a02668da4dde9cd 100644 (file)
@@ -1,17 +1,18 @@
 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/
@@ -207,22 +208,17 @@ aplikacji Bluetooth.
 %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
@@ -232,12 +228,24 @@ rm -rf $RPM_BUILD_ROOT
 
 %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
@@ -252,20 +260,18 @@ fi
 %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
diff --git a/dund.init b/dund.init
new file mode 100644 (file)
index 0000000..caa43c3
--- /dev/null
+++ b/dund.init
@@ -0,0 +1,79 @@
+#!/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
diff --git a/pand.init b/pand.init
new file mode 100644 (file)
index 0000000..872bf0e
--- /dev/null
+++ b/pand.init
@@ -0,0 +1,82 @@
+#!/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
diff --git a/rfcomm.init b/rfcomm.init
new file mode 100644 (file)
index 0000000..006c535
--- /dev/null
@@ -0,0 +1,82 @@
+#!/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
This page took 0.136988 seconds and 4 git commands to generate.