SOURCES: bluez-utils.init - revert last change -- looks like overw...

glen glen at pld-linux.org
Wed Jan 24 19:57:10 CET 2007


Author: glen                         Date: Wed Jan 24 18:57:09 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- revert last change -- looks like overwrite with some older revision

---- Files affected:
SOURCES:
   bluez-utils.init (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: SOURCES/bluez-utils.init
diff -u SOURCES/bluez-utils.init:1.12 SOURCES/bluez-utils.init:1.13
--- SOURCES/bluez-utils.init:1.12	Wed Jan 24 19:44:17 2007
+++ SOURCES/bluez-utils.init	Wed Jan 24 19:57:04 2007
@@ -19,10 +19,7 @@
 	UART_CONF="no"
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
 	# Check if the service is already running?
 	if [ ! -f /var/lock/subsys/bluetooth ]; then
 		msg_starting bluetooth; started
@@ -78,8 +75,9 @@
 	else
 		msg_already_running bluetooth
 	fi
-	;;
-  stop)
+}
+
+stop() {
 	if [ -f /var/lock/subsys/bluetooth ]; then
 		if is_yes "${PAND_ENABLE}" && [ -x /usr/bin/pand ]; then
 			msg_stopping pand
@@ -118,11 +116,20 @@
 	else
 		msg_not_running bluetooth
 	fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
 	;;
   restart)
-	$0 stop
-	$0 start
-	exit $?
+	stop
+	start
 	;;
   reload|force-reload)
 	if [ -f /var/lock/subsys/bluetooth ]; then
@@ -130,7 +137,7 @@
 		killproc hcid -HUP
 		RETVAL=$?
 	else
-		msg_not_running bluetooth >&2
+		msg_not_running bluetooth
 		exit 7
 	fi
 	;;
@@ -140,11 +147,7 @@
 	is_yes "${SDPD_ENABLE}" && status sdpd
 	is_yes "${HIDD_ENABLE}" && status hidd
 	is_yes "${DUND_ENABLE}" && status dund
-	if [ -f /var/lock/subsys/bluetooth ]; then
-		exit 0
-	else
-		exit 1
-	fi		
+	exit $?
 	;;
   *)
 	msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
@@ -152,6 +155,3 @@
 esac
 
 exit $RETVAL
-
-# This must be last line !
-# vi:syntax=sh:tw=78:ts=8:sw=4
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/bluez-utils.init?r1=1.12&r2=1.13&f=u



More information about the pld-cvs-commit mailing list