recipes-connectivity: Splited bluez and btfilter support in two different init scripts
btfilter (abtfilt) and bluetoothd are two independent services. Break the relationship between them and split the support in independent init scripts https://jira.digi.com/browse/DEL-1933 Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
parent
599627f214
commit
2767f5be7c
|
|
@ -86,10 +86,6 @@ bt_init() {
|
||||||
echo "${SCRIPTNAME}: FAILED (hciattach)"
|
echo "${SCRIPTNAME}: FAILED (hciattach)"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if ! abtfilt -b -x -s -w wlan0 1>/dev/null; then
|
|
||||||
echo "${SCRIPTNAME}: FAILED (abtfilt)"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if hciconfig hci0 up; then
|
if hciconfig hci0 up; then
|
||||||
: # No-op
|
: # No-op
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#===============================================================================
|
||||||
|
#
|
||||||
|
# btfilter
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 by Digi International Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License version 2 as published by
|
||||||
|
# the Free Software Foundation.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# !Description: Configure Bluetooth
|
||||||
|
#
|
||||||
|
#===============================================================================
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "${1}" != "start" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
SCRIPTNAME="$(basename "${0}")"
|
||||||
|
|
||||||
|
# Check if this hardware does support Bluetooth
|
||||||
|
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||||
|
echo "Starting btfilter service."
|
||||||
|
if ! abtfilt -b -x -s -w wlan0 1>/dev/null; then
|
||||||
|
echo "${SCRIPTNAME}: FAILED (abtfilt)"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
@ -6,6 +6,7 @@ LICENSE = "ISC"
|
||||||
LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=14;md5=8f6614b37751445a5f6a9bdc69be26b3"
|
LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=14;md5=8f6614b37751445a5f6a9bdc69be26b3"
|
||||||
|
|
||||||
inherit bluetooth
|
inherit bluetooth
|
||||||
|
inherit update-rc.d
|
||||||
|
|
||||||
DEPENDS = "${BLUEZ} dbus libnl"
|
DEPENDS = "${BLUEZ} dbus libnl"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ SRC_URI = " \
|
||||||
file://0002-cross-compile.patch \
|
file://0002-cross-compile.patch \
|
||||||
file://0003-abtfilt_wan-Rewrite-the-netlink-listener.patch \
|
file://0003-abtfilt_wan-Rewrite-the-netlink-listener.patch \
|
||||||
file://0004-add-fgnu89-flag-for-gcc5.patch \
|
file://0004-add-fgnu89-flag-for-gcc5.patch \
|
||||||
|
file://btfilter-init \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "06a26d3a368c33b508d660ea84d476ee"
|
SRC_URI[md5sum] = "06a26d3a368c33b508d660ea84d476ee"
|
||||||
|
|
@ -23,6 +25,10 @@ SRC_URI[sha256sum] = "b1af73003b622189b66d51911d429d6d205ac9227ec8278c8572ca0c68
|
||||||
EXTRA_OEMAKE = "INCLUDES=-I${STAGING_INCDIR}/bluetooth"
|
EXTRA_OEMAKE = "INCLUDES=-I${STAGING_INCDIR}/bluetooth"
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}${bindir}
|
install -d ${D}${bindir} ${D}${sysconfdir}/init.d/
|
||||||
install -m 0755 abtfilt ${D}${bindir}
|
install -m 0755 abtfilt ${D}${bindir}
|
||||||
|
install -m 0755 ${WORKDIR}/btfilter-init ${D}${sysconfdir}/init.d/btfilter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INITSCRIPT_NAME = "btfilter"
|
||||||
|
INITSCRIPT_PARAMS = "start 11 5 ."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue