[Pkg-bluetooth-commits] r721 - in /packages/bluez-utils/trunk/debian: bluez-utils.bluetooth.init changelog rules

filippo at users.alioth.debian.org filippo at users.alioth.debian.org
Sat Jun 21 14:03:24 UTC 2008


Author: filippo
Date: Sat Jun 21 14:03:23 2008
New Revision: 721

URL: http://svn.debian.org/wsvn/pkg-bluetooth/?sc=1&rev=721
Log:
restore 3.30-3 back to trunk

Modified:
    packages/bluez-utils/trunk/debian/bluez-utils.bluetooth.init
    packages/bluez-utils/trunk/debian/changelog
    packages/bluez-utils/trunk/debian/rules

Modified: packages/bluez-utils/trunk/debian/bluez-utils.bluetooth.init
URL: http://svn.debian.org/wsvn/pkg-bluetooth/packages/bluez-utils/trunk/debian/bluez-utils.bluetooth.init?rev=721&op=diff
==============================================================================
--- packages/bluez-utils/trunk/debian/bluez-utils.bluetooth.init (original)
+++ packages/bluez-utils/trunk/debian/bluez-utils.bluetooth.init Sat Jun 21 14:03:23 2008
@@ -56,8 +56,29 @@
 
 . /lib/lsb/init-functions
 
+# test for essential daemons
 test -x $HCID || exit 0
 test -x $HCIATTACH || exit 0
+test -x $RFCOMM || exit 0
+
+# disable nonessential daemons if not present
+if test "$DUND_ENABLED" != "0"; then
+	if ! test -x $DUND_DAEMON; then
+		DUND_ENABLED=0
+	fi
+fi
+
+if test "$PAND_ENABLED" != "0"; then
+	if ! test -x $PAND_DAEMON; then
+		PAND_ENABLED=0
+	fi
+fi
+
+if test "$HIDD_ENABLED" != "0"; then
+	if ! test -x $HIDD_DAEMON; then
+		HIDD_ENABLED=0
+	fi
+fi
 
 set -e
 
@@ -88,7 +109,7 @@
                log_progress_msg "hid_devices"
                $HID2HCI --tohci
        else
-               $HID2HCI --tohci > /dev/null 2>&1
+               $HID2HCI --tohci >/dev/null 2>&1
        fi
 }
 
@@ -98,8 +119,51 @@
                log_progress_msg "hid_devices"
                $HID2HCI --tohid
        else
-               $HID2HCI --tohid > /dev/null 2>&1
+               $HID2HCI --tohid >/dev/null 2>&1
        fi
+}
+
+start_pan()
+{
+	if test "$DUND_ENABLED" != "0"; then
+		start-stop-daemon --start --quiet --exec $DUND_DAEMON -- $DUND_OPTIONS
+		[ "$VERBOSE" != no ] && log_progress_msg "pand"
+
+	fi
+	if test "$PAND_ENABLED" != "0"; then
+		start-stop-daemon --start --quiet --exec $PAND_DAEMON -- $PAND_OPTIONS
+		[ "$VERBOSE" != no ] && log_progress_msg "pand"
+	fi
+}
+
+
+stop_pan()
+{
+	if test "$DUND_ENABLED" != "0"; then
+		start-stop-daemon --stop --quiet --exec $DUND_DAEMON || true
+		[ "$VERBOSE" != no ] && log_progress_msg "pand"
+	fi
+	if test "$PAND_ENABLED" != "0"; then
+		start-stop-daemon --stop --quiet --exec $PAND_DAEMON || true
+		[ "$VERBOSE" != no ] && log_progress_msg "pand"
+	fi
+}
+
+start_hid()
+{
+	if test "$HIDD_ENABLED" != "0"; then
+		start-stop-daemon --start --quiet --exec $HIDD_DAEMON -- $HIDD_OPTIONS
+		[ "$VERBOSE" != no ] && log_progress_msg "hidd"
+	fi
+}
+
+stop_hid()
+{
+	if test "$HIDD_ENABLED" != "0"; then
+		$HIDD_DAEMON --killall
+		start-stop-daemon --stop --quiet --exec $HIDD_DAEMON || true
+		[ "$VERBOSE" != no ] && log_progress_msg "hidd"
+	fi
 }
 
 start_uarts()
@@ -172,13 +236,16 @@
 	start-stop-daemon --start --quiet --exec $HCID -- $HCID_OPTIONS || true
 	log_progress_msg "hcid"
 	
-	#run_sdptool || true
+	run_sdptool || true
 
 	start_uarts || true
 	
+	start_hid || true
 	if test "$HID2HCI_ENABLED" = "1"; then
 		enable_hci_input || true
 	fi
+	start_rfcomm || true
+	start_pan || true
 	log_end_msg 0
     ;;
   stop)
@@ -188,10 +255,12 @@
 		log_end_msg 0
 		exit 0
 	fi
+	stop_pan || true
 	stop_rfcomm || true
 	if test "$HID2HCI_ENABLED" = "1"; then
 		disable_hci_input || true
 	fi
+	stop_hid || true
 	start-stop-daemon --stop --quiet --exec $HCID || true
 	log_progress_msg "hcid"
 	stop_uarts || true
@@ -199,6 +268,8 @@
     ;;
   restart|force-reload)
 	log_daemon_msg "Restarting $DESC"
+	stop_hid || true
+	stop_pan || true
 	start-stop-daemon --stop --quiet --exec $HCID || true
 	sleep 1
 	if test "$BLUETOOTH_ENABLED" = "0"; then
@@ -208,6 +279,8 @@
 	fi
 	start-stop-daemon --start --quiet --exec $HCID -- $HCID_OPTIONS || true
 	log_progress_msg "hcid"
+	start_pan || true
+	start_hid || true
 	restart_rfcomm
 	log_end_msg 0
     ;;

Modified: packages/bluez-utils/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-bluetooth/packages/bluez-utils/trunk/debian/changelog?rev=721&op=diff
==============================================================================
--- packages/bluez-utils/trunk/debian/changelog (original)
+++ packages/bluez-utils/trunk/debian/changelog Sat Jun 21 14:03:23 2008
@@ -1,12 +1,3 @@
-bluez-utils (3.30-3exp1) experimental; urgency=low
-
-  [ Filippo Giunchedi ]
-  * New upstream release
-  * Enable services inside hcid, replacing old racy daemons and change init
-    script accordingly (Closes: #454727)
-
- -- Filippo Giunchedi <filippo at debian.org>  Tue, 15 Apr 2008 17:33:47 +0200
-
 bluez-utils (3.30-3) unstable; urgency=low
 
   * Add watch file 

Modified: packages/bluez-utils/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-bluetooth/packages/bluez-utils/trunk/debian/rules?rev=721&op=diff
==============================================================================
--- packages/bluez-utils/trunk/debian/rules (original)
+++ packages/bluez-utils/trunk/debian/rules Sat Jun 21 14:03:23 2008
@@ -8,14 +8,9 @@
 
 DEB_UPDATE_RCD_PARAMS = "start 25 2 3 4 5 . stop 74 0 1 6 ."
 DEB_DH_INSTALLINIT_ARGS = "--name=bluetooth"
-#DH_ALWAYS_EXCLUDE = "README"
-DEB_CONFIGURE_EXTRA_FLAGS := --disable-initscripts --disable-sdpd \
-	--enable-cups --enable-hid2hci \
-	--enable-glib --enable-pcmciarules --enable-network \
-	--enable-input --enable-serial \
-	--enable-dfutool --enable-bccmd \
-	--enable-alsa --enable-audio 
-#DEB_CONFIGURE_EXTRA_FLAGS := --disable-initscripts --enable-obex --enable-cups --enable-hid2hci --enable-input --enable-network --enable-serial
+#DEB_CONFIGURE_EXTRA_FLAGS := --disable-initscripts --enable-obex --enable-cups --enable-hid2hci --disable-sdpd --enable-glib --enable-pcmciarules --enable-audio --enable-alsa 
+DEB_CONFIGURE_EXTRA_FLAGS := --disable-initscripts --enable-obex --enable-cups --enable-hid2hci --disable-sdpd --enable-glib --enable-pcmciarules --enable-audio --enable-alsa --enable-hidd --enable-pand --enable-dund
+
 DEB_DESTDIR := $(CURDIR)/debian/tmp
 
 install/bluez-utils::




More information about the Pkg-bluetooth-commits mailing list