Created attachment 55509 [details] [review] add a systemd service upower should install a systemd service file and add a SystemdService= line to its dbus-activated service. By doing that it will be started by systemd instead of dbus. This has the advantage that it will be treated like any other system daemon and put in its own cgroup by systemd. Also its state can be checked and it can easily be restarted or stopped if it might misbehave. On systems without systemd, dbus will start the daemon itself, just like it does now. Attached is a patch that implements this behaviour. Like most other packages that support systemd, it adds a --with-systemdsystemunitdir switch to configure. Installation of the systemd service file can also be disabled using this configure switch.
That description should obviously say colord, not upower… But as you will notice, the patches look very similar too and do the same thing, so I copy&pasted the description. :)
Committed with some minor modifications, thanks.
Created attachment 55750 [details] [review] some fixes to what was comitted - fix configure to correctly interpret --without-systemdsystemunitdir - make sure the service.in file is included by make dist - Tweak service description (comments from systemd people) - don't use the word "daemon" (nothing else does) - Title Case - drop WantedBy line, it's not really needed and noone will use it
commit 32c9bffc3264d09fe755f7abbc3e77b167a30371 Author: Benedikt Morbach <benedikt.morbach@googlemail.com> Date: Tue May 22 12:28:11 2012 +0100 Fix autotools when configuring without systemd Signed-off-by: Richard Hughes <richard@hughsie.com> :100644 100644 22d4f28... bd4ec9d... M configure.ac :100644 100644 516c6a2... 23aeca8... M data/Makefile.am commit eb14ca20a52d92465c586c19764cb16ccd9e3c55 Author: Benedikt Morbach <benedikt.morbach@googlemail.com> Date: Tue May 22 12:25:23 2012 +0100 Fix the description in the systemd service file Signed-off-by: Richard Hughes <richard@hughsie.com> :100644 100644 f662fbb... b473397... M data/colord.service.in commit 80ca44664b8e433ddc39f7953ff4de2e589103dd Author: Benedikt Morbach <benedikt.morbach@googlemail.com> Date: Tue May 22 12:24:23 2012 +0100 Do not use 'WantedBy=graphical.target' in the shipped systemd file Signed-off-by: Richard Hughes <richard@hughsie.com> :100644 100644 8301b40... f662fbb... M data/colord.service.in
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.