-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bluez5: Persist storage directory over reboots
Currently, bluez's storage data is set to /var/lib/bluetooth which in turn is a tmpfs location. We want this location persistent so we can save paired devices over reboot. We do that by adding the corresponding bind mount to the state partition and setting bluez to depend on this mount unit. Fixes #1544 Change-type: minor Changelog-entry: Persist bluetooth storage data over reboots Signed-off-by: Andrei Gherzan <andrei@balena.io>
- Loading branch information
Andrei Gherzan
committed
Jun 13, 2019
1 parent
41acd1b
commit 3815e42
Showing
3 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
12 changes: 9 additions & 3 deletions
12
meta-balena-common/recipes-connectivity/bluez5/bluez5_%.bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
FILESEXTRAPATHS_append := ":${THISDIR}/files" | ||
|
||
SRC_URI += " \ | ||
file://10-local-bt-hci-up.rules \ | ||
file://run-bluetoothd-with-experimental-flag.patch \ | ||
" | ||
file://10-local-bt-hci-up.rules \ | ||
file://bluetooth.conf.systemd \ | ||
file://run-bluetoothd-with-experimental-flag.patch \ | ||
" | ||
|
||
do_install_append() { | ||
install -D -m 0755 ${WORKDIR}/10-local-bt-hci-up.rules ${D}/lib/udev/rules.d/10-local-bt-hci-up.rules | ||
|
||
install -d ${D}${sysconfdir}/systemd/system/bluetooth.service.d | ||
install -m 0644 ${WORKDIR}/bluetooth.conf.systemd ${D}${sysconfdir}/systemd/system/bluetooth.service.d/bluetooth.conf | ||
|
||
install -d ${D}/var/lib/bluetooth | ||
} |
3 changes: 3 additions & 0 deletions
3
meta-balena-common/recipes-connectivity/bluez5/files/bluetooth.conf.systemd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[Unit] | ||
Requires=bind-var-lib-bluetooth.service | ||
After=bind-var-lib-bluetooth.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters