Am 02.08.2012 06:41, schrieb Will Stephenson:
On Friday 27 Jul 2012 19:32:47 Stefan Seyfried wrote:
(redirecting to factory again)
Am 27.07.2012 17:55, schrieb "Stefan Brüns":
Am 07/27/12, schrieb Stefan Seyfried <stefan.seyfried@googlemail.com>:
The problem is, that starting a service by default is considered bad. And I am still looking for ideas on how to start it only if a bluetooth adapter is present... :-(
should be working out of the box already (see systemd for Developers II [1], Hardware Activation in Detail):
cat /lib/systemd/system/bluetooth.service [Unit] Description=Bluetooth service After=syslog.target
[Service] Type=dbus BusName=org.bluez ExecStart=/usr/sbin/bluetoothd -n StandardOutput=syslog
[Install] WantedBy=bluetooth.target
Yes, but it only works if we "systemctl enable bluetooth.service" And then bluetoothd is started regardless of an adapter being present...
Would something like this work?
/etc/udev/rules.d/95-bluez.rules: SUBSYSTEM=="bluetooth", NAME=="hci?", TAG+="systemd", ACTION=="add", \ ENV{SYSTEMD_WANTS}="bluetooth.service"
That's already in upstream systemd: seife@susi:~> grep SYSTEMD_WANTS.*bluetooth /lib/udev/rules.d/* /lib/udev/rules.d/99-systemd.rules:SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}="bluetooth.target" But it only works if I "systemctl enable bluetooth.service". And then bluetoothd is always started, no matter if an adapter is present or not...
What I don't know is how to decouple the service being enabled but not started by default. Systemd experts?
Yes, that would be needed. -- Stefan Seyfried "If your lighter runs out of fluid or flint and stops making fire, and you can't be bothered to figure out about lighter fluid or flint, that is not Zippo's fault." -- bkw -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org