Skip to content

Commit

Permalink
Do not start hciuart.service/bthelper@hci0.service if krnbt is used (#…
Browse files Browse the repository at this point in the history
…2947)

* Do not start hciuart.service if krnbt is used

Avoid starting (and failing to start) hciuart.service if krnbt is used.
This avoid unnecessary failed services showing up.

* Update buildroot-external/package/pi-bluetooth/hciuart.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Drop duplicate bluetooth in path

* Avoid bthelper@hci0.service failing

* Revert "Avoid bthelper@hci0.service failing"

This reverts commit f79777e.

* Add ExecConditiono to bthelper@.service as well

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
  • Loading branch information
agners and sairon committed Nov 28, 2023
1 parent c3b9912 commit 93a2d8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions buildroot-external/package/pi-bluetooth/bthelper@.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Before=bluetooth.service

[Service]
Type=oneshot
ExecCondition=/bin/sh -c '[ "$(cat /proc/device-tree/$(cat /proc/device-tree/aliases/bluetooth)/status)" != "okay" ]'
ExecStart=/usr/bin/bthelper %I
RemainAfterExit=yes
1 change: 1 addition & 0 deletions buildroot-external/package/pi-bluetooth/hciuart.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=dev-serial1.device

[Service]
Type=forking
ExecCondition=/bin/sh -c '[ "$(cat /proc/device-tree/$(cat /proc/device-tree/aliases/bluetooth)/status)" != "okay" ]'
ExecStart=/usr/bin/btuart

[Install]
Expand Down

0 comments on commit 93a2d8a

Please sign in to comment.