]> git.pld-linux.org Git - packages/bluez-utils.git/blobdiff - bluez-utils.init
- sdpd binary is no more
[packages/bluez-utils.git] / bluez-utils.init
index b624e71bc443780d94416ea85b6c1920fcdfb219..df2c62f948c52a80e795ca462282b22d8cc9f729 100644 (file)
@@ -31,14 +31,13 @@ start() {
                fi
                
                if is_yes "${HCID_ENABLE}" && [ -x /usr/sbin/hcid ]; then
+                       HCID_FLAGS="-f /etc/bluetooth/hcid.conf"
+
+                       if is_yes "${SDPD_ENABLE}" ; then
+                               HCID_FLAGS="$HCID_FLAGS -s"
+                       fi
                        msg_starting hcid
-                       daemon /usr/sbin/hcid -f /etc/bluetooth/hcid.conf
-                       RETVAL=$?
-               fi
-       
-               if is_yes "${SDPD_ENABLE}" && [ -x /usr/sbin/sdpd ]; then
-                       msg_starting sdpd
-                       daemon /usr/sbin/sdpd
+                       daemon /usr/sbin/hcid $HCID_FLAGS
                        RETVAL=$?
                fi
                
@@ -99,14 +98,9 @@ stop() {
                        killproc /usr/bin/hidd
                fi
        
-               if is_yes "${SDPD_ENABLE}" && [ -x /usr/sbin/sdpd ]; then
-                       msg_stopping sdpd
-                       killproc /usr/sbin/sdpd
-               fi
-       
                if is_yes "${HCID_ENABLE}" && [ -x /usr/sbin/hcid ]; then
                        msg_stopping hcid
-                       daemon /usr/sbin/hcid
+                       killproc /usr/sbin/hcid
                fi
 
                if [ "$UART_CONF" != "no" ]; then
@@ -147,7 +141,11 @@ case "$1" in
        is_yes "${SDPD_ENABLE}" && status sdpd
        is_yes "${HIDD_ENABLE}" && status hidd
        is_yes "${DUND_ENABLE}" && status dund
-       exit $?
+       if [ -f /var/lock/subsys/bluetooth ]; then
+               exit 0
+       else
+               exit 1
+       fi              
        ;;
   *)
        msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
This page took 0.063644 seconds and 4 git commands to generate.