summaryrefslogtreecommitdiff
path: root/recipes-connectivity/bluez
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-07-22 17:16:02 -0500
committerJohn Klug <john.klug@multitech.com>2020-07-22 17:16:02 -0500
commit101849516150716c1fe2141746dbea0f843732b6 (patch)
tree2a723b4e9a287e1a37e7fdfa0923738da8aa676c /recipes-connectivity/bluez
parent36a8e6c1cb1a5fbfe460e6a8125e220b93a19d49 (diff)
downloadmeta-mlinux-101849516150716c1fe2141746dbea0f843732b6.tar.gz
meta-mlinux-101849516150716c1fe2141746dbea0f843732b6.tar.bz2
meta-mlinux-101849516150716c1fe2141746dbea0f843732b6.zip
BT-Name missing from WiFi BT access point test
Diffstat (limited to 'recipes-connectivity/bluez')
-rw-r--r--recipes-connectivity/bluez/bluez5/BT-Name23
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes-connectivity/bluez/bluez5/BT-Name b/recipes-connectivity/bluez/bluez5/BT-Name
new file mode 100644
index 0000000..25c2d9f
--- /dev/null
+++ b/recipes-connectivity/bluez/bluez5/BT-Name
@@ -0,0 +1,23 @@
+diff -Naru orig/etc/init.d/bluetooth new/etc/init.d/bluetooth
+--- orig/etc/init.d/bluetooth 2020-06-12 13:14:37.000000000 -0500
++++ new/etc/init.d/bluetooth 2020-06-29 14:53:56.824235818 -0500
+@@ -16,6 +16,9 @@
+ # FIXME: any of the sourced files may fail if/with syntax errors
+ test -f /etc/default/bluetooth && . /etc/default/bluetooth
+ test -f /etc/default/rcS && . /etc/default/rcS
++DEVID=$(mts-io-sysfs show device-id)
++HOSTNAME=$(uname -n)
++NAME="${HOSTNAME}-${DEVID}"
+
+ set -e
+
+@@ -28,6 +31,9 @@
+ exit 0
+ fi
+
++ if ! grep -q "^Name = ${NAME}$" /etc/bluetooth/main.conf ; then
++ sed -i "s/^Name = .*/Name = ${NAME}/" /etc/bluetooth/main.conf
++ fi
+ start-stop-daemon --start --background $SSD_OPTIONS $MOREOPTIONS
+ sleep 1
+ if [[ -n ${BLUETOOTHCTL_CMD} ]] ; then