Author: arekm                        Date: Tue Aug  4 19:13:26 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; init scripts into separate files

---- Files affected:
packages/bluez:
   bluez.init (1.4 -> 1.5) , bluez.spec (1.30 -> 1.31) , dund.init (NONE -> 
1.1)  (NEW), pand.init (NONE -> 1.1)  (NEW), rfcomm.init (NONE -> 1.1)  (NEW), 
bluez-udev-path.patch (1.1 -> NONE)  (REMOVED), bluez-udev.rules (1.1 -> NONE)  
(REMOVED), bluez-udev.script (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/bluez/bluez.init
diff -u packages/bluez/bluez.init:1.4 packages/bluez/bluez.init:1.5
--- packages/bluez/bluez.init:1.4       Tue Apr 14 00:18:09 2009
+++ packages/bluez/bluez.init   Tue Aug  4 21:13:20 2009
@@ -2,7 +2,7 @@
 #
 # bluetooth    Bluetooth subsystem starting and stopping
 #
-# chkconfig:   345 25 90
+# chkconfig:   345 50 83
 #
 # description: Bluetooth subsystem
 #
@@ -12,58 +12,15 @@
 # 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 @@
 
 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 @@
   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: packages/bluez/bluez.spec
diff -u packages/bluez/bluez.spec:1.30 packages/bluez/bluez.spec:1.31
--- packages/bluez/bluez.spec:1.30      Fri Jul 31 08:56:01 2009
+++ packages/bluez/bluez.spec   Tue Aug  4 21:13:20 2009
@@ -2,17 +2,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/
@@ -208,22 +209,17 @@
 %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
@@ -233,12 +229,24 @@
 
 %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
@@ -253,20 +261,18 @@
 %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
@@ -306,6 +312,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.31  2009/08/04 19:13:20  arekm
+- rel 2; init scripts into separate files
+
 Revision 1.30  2009/07/31 06:56:01  matkor
 Update to 4.45-1. wacom patches added. (all by Przemys�aw Firszt).
 

================================================================
Index: packages/bluez/dund.init
diff -u /dev/null packages/bluez/dund.init:1.1
--- /dev/null   Tue Aug  4 21:13:26 2009
+++ packages/bluez/dund.init    Tue Aug  4 21:13:20 2009
@@ -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

================================================================
Index: packages/bluez/pand.init
diff -u /dev/null packages/bluez/pand.init:1.1
--- /dev/null   Tue Aug  4 21:13:26 2009
+++ packages/bluez/pand.init    Tue Aug  4 21:13:20 2009
@@ -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

================================================================
Index: packages/bluez/rfcomm.init
diff -u /dev/null packages/bluez/rfcomm.init:1.1
--- /dev/null   Tue Aug  4 21:13:26 2009
+++ packages/bluez/rfcomm.init  Tue Aug  4 21:13:20 2009
@@ -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
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/bluez/bluez.init?r1=1.4&r2=1.5&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/bluez/bluez.spec?r1=1.30&r2=1.31&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to