summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bluez5
diff options
context:
space:
mode:
authorDavid Frey <dpfrey@gmail.com>2019-01-10 11:23:52 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 11:35:56 +0000
commit0c3278af9077184947c9eeb190e1088d71953653 (patch)
tree97c436cfd836c3cf0791f165003e0ee2c76aa46c /meta/recipes-connectivity/bluez5
parent889d9e037fe426e8d2ee12af9500627c23dae7b0 (diff)
downloadpoky-0c3278af9077184947c9eeb190e1088d71953653.tar.gz
bluez5: Fix status subcommand of init script
Update the bluez5 init script to resolve an issue where the status subcommand would exit without printing any message if bluez was not running. The early exit was caused by the fact that the init script has "set -e". When "pidof ${DAEMON} >/dev/null" is executed, the script terminates immediately if bluez isn't running because pidof returns a non-zero result. The fixed version does not suffer from this issue and makes use of the "status" function from the functions library. (From OE-Core rev: f6e03a43ee71c406fa8e68309624efd5384f437a) Signed-off-by: David Frey <dpfrey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/bluez5')
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/init12
1 files changed, 4 insertions, 8 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5/init b/meta/recipes-connectivity/bluez5/bluez5/init
index d7972f2d95..ca9fa18549 100644
--- a/meta/recipes-connectivity/bluez5/bluez5/init
+++ b/meta/recipes-connectivity/bluez5/bluez5/init
@@ -1,5 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# Source function library
4. /etc/init.d/functions
5
3PATH=/sbin:/bin:/usr/sbin:/usr/bin 6PATH=/sbin:/bin:/usr/sbin:/usr/bin
4DESC=bluetooth 7DESC=bluetooth
5 8
@@ -44,14 +47,7 @@ case $1 in
44 $0 start 47 $0 start
45 ;; 48 ;;
46 status) 49 status)
47 pidof ${DAEMON} >/dev/null 50 status ${DAEMON} || exit $?
48 status=$?
49 if [ $status -eq 0 ]; then
50 echo "bluetooth is running."
51 else
52 echo "bluetooth is not running"
53 fi
54 exit $status
55 ;; 51 ;;
56 *) 52 *)
57 N=/etc/init.d/bluetooth 53 N=/etc/init.d/bluetooth