bluetooth-init: start driver load service after bluetooth daemon

The bluetooth daemon does not need the interface to exist before being
executed. We configure the daemon with AutoEnable=true, which will enable
adapters present on start or that appear later on.

On shutdown, systemd stops services in the opposite order to the boot,
so configuring the driver load service after the bluetooth service,
ensures that on shutdown the driver is unloaded before the bluetooth
daemon is stopped.

The btnxpuart driver needs this order, to prevent a module unload failure
on system reboot/poweroff.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2024-08-30 18:22:37 +02:00
parent 542a9aa83e
commit 4c33a85d6b
1 changed files with 1 additions and 2 deletions

View File

@ -1,8 +1,7 @@
[Unit]
Description=Initialization of the IW612 bluetooth chip
ConditionPathIsDirectory=/proc/device-tree/bluetooth
Before=bluetooth.service
After=systemd-modules-load.service
After=systemd-udev-settle.service,bluetooth.service
[Service]
Type=oneshot