Re: [PATCH] systemd: Check if bluetooth is supported in the kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

> When running a kernel without bluetooth support, bluetooth.service fails to
> start with
> 
>    bluetoothd[1640]: Failed to access management interface
>    bluetoothd[1640]: Adapter handling initialization failed
>    systemd[1]: bluetooth.service: Main process exited, code=exited, status=1/FAILURE
>    systemd[1]: Failed to start Bluetooth service.
> 
> This causes an unnecessary "degraded" state and more importantly breaks package
> installation when the bluez package auto-starts the daemon.
> 
> Add a condition to only start the service if /sys/class/bluetooth exists.
> 
> https://launchpad.net/bugs/1506774
> ---
> src/bluetooth.service.in | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
> index 35e9457..83e4732 100644
> --- a/src/bluetooth.service.in
> +++ b/src/bluetooth.service.in
> @@ -1,6 +1,7 @@
> [Unit]
> Description=Bluetooth service
> Documentation=man:bluetoothd(8)
> +ConditionPathIsDirectory=/sys/class/bluetooth

and this is not a race condition? I mean that directory might be not present because the module has not yet been loaded. So strictly speaking the kernel has been compiled with Bluetooth support, but it has not been yet loaded. Are we not exchanged one issue for another?

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux