bluez5: use node status to trigger bluetooth initialization
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
086db36811
commit
401867f9e6
|
|
@ -67,9 +67,11 @@ bluetooth_init() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||||
echo -n "Starting bluetooth hardware: "
|
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
|
||||||
bluetooth_init
|
echo -n "Starting bluetooth hardware: "
|
||||||
echo "${BT_ERROR:-done.}"
|
bluetooth_init
|
||||||
|
echo "${BT_ERROR:-done.}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
|
|
||||||
|
|
@ -111,9 +111,11 @@ bluetooth_init() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||||
echo -n "Starting bluetooth hardware: "
|
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
|
||||||
bluetooth_init
|
echo -n "Starting bluetooth hardware: "
|
||||||
echo "done."
|
bluetooth_init
|
||||||
|
echo "${BT_ERROR:-done.}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,11 @@ bluetooth_init() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||||
echo -n "Starting bluetooth hardware: "
|
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
|
||||||
bluetooth_init
|
echo -n "Starting bluetooth hardware: "
|
||||||
echo "${BT_ERROR:-done.}"
|
bluetooth_init
|
||||||
|
echo "${BT_ERROR:-done.}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,11 @@ bluetooth_init() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||||
echo -n "Starting bluetooth hardware: "
|
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
|
||||||
bluetooth_init
|
echo -n "Starting bluetooth hardware: "
|
||||||
echo "${BT_ERROR:-done.}"
|
bluetooth_init
|
||||||
|
echo "${BT_ERROR:-done.}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue