mirror of
https://abf.rosa.ru/djam/bluez.git
synced 2025-02-23 07:02:54 +00:00
Updated to 5.50
This commit is contained in:
parent
ba735fa6f7
commit
58859026a4
3 changed files with 24 additions and 41 deletions
21
bluetooth.service
Normal file
21
bluetooth.service
Normal file
|
@ -0,0 +1,21 @@
|
|||
[Unit]
|
||||
Description=Bluetooth service
|
||||
Documentation=man:bluetoothd(8)
|
||||
ConditionPathIsDirectory=/sys/class/bluetooth
|
||||
After=NetworkManager.service
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
BusName=org.bluez
|
||||
ExecStart=/usr/lib64/bluetooth/bluetoothd
|
||||
NotifyAccess=main
|
||||
#WatchdogSec=10
|
||||
#Restart=on-failure
|
||||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
|
||||
LimitNPROC=1
|
||||
ProtectHome=true
|
||||
ProtectSystem=full
|
||||
|
||||
[Install]
|
||||
WantedBy=bluetooth.target
|
||||
Alias=dbus-org.bluez.service
|
|
@ -1,38 +0,0 @@
|
|||
From 488fd81a0f9cb193a733ac03fba0a80c145868c9 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
Date: Tue, 20 Oct 2015 12:24:45 +0200
|
||||
Subject: systemd: Check if bluetooth is supported in the kernel
|
||||
|
||||
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
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
Summary: Official Linux Bluetooth protocol stack
|
||||
Name: bluez
|
||||
Version: 5.50
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: GPLv2+
|
||||
Group: Communications
|
||||
Url: http://www.bluez.org/
|
||||
|
@ -17,6 +17,7 @@ Source4: rfcomm.conf
|
|||
Source5: bluetooth.conf
|
||||
Source6: 10-local.rules
|
||||
Source7: 97-bluetooth.rules
|
||||
Source8: bluetooth.service
|
||||
Source10: bluez-uinput.modules
|
||||
## Ubuntu patches
|
||||
Patch0: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
|
||||
|
@ -261,6 +262,7 @@ rm %{buildroot}%{_sysconfdir}/udev/rules.d/*.rules
|
|||
install -p -m644 tools/hid2hci.rules -D %{buildroot}/lib/udev/rules.d/97-hid2hci.rules
|
||||
install -m644 %{SOURCE6} -D %{buildroot}%{_sysconfdir}/udev/rules.d/10-local.rules
|
||||
install -m644 %{SOURCE7} -D %{buildroot}%{_udevrulesdir}/97-bluetooth.rules
|
||||
install -m644 %{SOURCE8} -D %{buildroot}%{_unitdir}/bluetooth.service
|
||||
sed s,"/usr/bin/bluetoothd","%{_libexecdir}/bluetooth/bluetoothd",g -i %{buildroot}%{_udevrulesdir}/97-bluetooth.rules
|
||||
|
||||
#install more config files
|
||||
|
@ -273,6 +275,4 @@ install -d -m0755 %{buildroot}%{_localstatedir}/lib/bluetooth
|
|||
|
||||
ln -s bluetooth.service %{buildroot}%{_unitdir}/dbus-org.bluez.service
|
||||
|
||||
sed 's|WantedBy=bluetooth.target|WantedBy=multi-user.target|' -i %{buildroot}%{_unitdir}/bluetooth.service
|
||||
sed 's|#AutoEnable=false|AutoEnable=true|' -i %{buildroot}%{_sysconfdir}/bluetooth/main.conf
|
||||
sed 's|#FastConnectable = false|FastConnectable = true|' -i %{buildroot}%{_sysconfdir}/bluetooth/main.conf
|
||||
|
|
Loading…
Add table
Reference in a new issue