diff options
Diffstat (limited to 'meta/recipes-connectivity/bluez5/bluez5/init')
-rw-r--r-- | meta/recipes-connectivity/bluez5/bluez5/init | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5/init b/meta/recipes-connectivity/bluez5/bluez5/init index 489e9b9eba..ca9fa18549 100644 --- a/meta/recipes-connectivity/bluez5/bluez5/init +++ b/meta/recipes-connectivity/bluez5/bluez5/init @@ -1,5 +1,8 @@ #!/bin/sh +# Source function library +. /etc/init.d/functions + PATH=/sbin:/bin:/usr/sbin:/usr/bin DESC=bluetooth @@ -21,25 +24,22 @@ set -e case $1 in start) - echo "Starting $DESC" - + echo -n "Starting $DESC: " if test "$BLUETOOTH_ENABLED" = 0; then - echo "disabled. see /etc/default/bluetooth" + echo "disabled (see /etc/default/bluetooth)." exit 0 fi - start-stop-daemon --start --background $SSD_OPTIONS - echo "${DAEMON##*/}" - + echo "${DAEMON##*/}." ;; stop) - echo "Stopping $DESC" + echo -n "Stopping $DESC: " if test "$BLUETOOTH_ENABLED" = 0; then - echo "disabled." + echo "disabled (see /etc/default/bluetooth)." exit 0 fi start-stop-daemon --stop $SSD_OPTIONS - echo "${DAEMON}" + echo "${DAEMON##*/}." ;; restart|force-reload) $0 stop @@ -47,14 +47,7 @@ case $1 in $0 start ;; status) - pidof ${DAEMON} >/dev/null - status=$? - if [ $status -eq 0 ]; then - echo "bluetooth is running." - else - echo "bluetooth is not running" - fi - exit $status + status ${DAEMON} || exit $? ;; *) N=/etc/init.d/bluetooth |