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
|
||||
start)
|
||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||
echo -n "Starting bluetooth hardware: "
|
||||
bluetooth_init
|
||||
echo "${BT_ERROR:-done.}"
|
||||
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
|
||||
echo -n "Starting bluetooth hardware: "
|
||||
bluetooth_init
|
||||
echo "${BT_ERROR:-done.}"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
|
|
|
|||
|
|
@ -111,9 +111,11 @@ bluetooth_init() {
|
|||
case "$1" in
|
||||
start)
|
||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||
echo -n "Starting bluetooth hardware: "
|
||||
bluetooth_init
|
||||
echo "done."
|
||||
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
|
||||
echo -n "Starting bluetooth hardware: "
|
||||
bluetooth_init
|
||||
echo "${BT_ERROR:-done.}"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
|
|
|
|||
|
|
@ -93,9 +93,11 @@ bluetooth_init() {
|
|||
case "$1" in
|
||||
start)
|
||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||
echo -n "Starting bluetooth hardware: "
|
||||
bluetooth_init
|
||||
echo "${BT_ERROR:-done.}"
|
||||
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
|
||||
echo -n "Starting bluetooth hardware: "
|
||||
bluetooth_init
|
||||
echo "${BT_ERROR:-done.}"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
|
|
|
|||
|
|
@ -42,9 +42,11 @@ bluetooth_init() {
|
|||
case "$1" in
|
||||
start)
|
||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||
echo -n "Starting bluetooth hardware: "
|
||||
bluetooth_init
|
||||
echo "${BT_ERROR:-done.}"
|
||||
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
|
||||
echo -n "Starting bluetooth hardware: "
|
||||
bluetooth_init
|
||||
echo "${BT_ERROR:-done.}"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
|
|
|
|||
Loading…
Reference in New Issue