[systemd-devel] D-Bus services: automatically set Type=dbus?

Lennart Poettering lennart at poettering.net
Thu May 3 05:56:37 PDT 2012


On Tue, 01.05.12 12:09, Bill Nottingham (notting at redhat.com) wrote:

> The wpa_supplicant service we had in Fedora shipped this dbus service file:
> 
> ...
> [D-BUS Service]
> Name=fi.w1.wpa_supplicant1
> SystemdService=wpa_supplicant.service
> ...
> and the following wpa_supplicant.service file:
> 
> ...
> [Service]
> Type=forking
> ...
> 
> Should this be an error that systemd checks, or warns about - should any
> service referred to by a DBus service file automatically inherit Type=dbus,
> and the appropriate BusName argument?

Good point!

i have now changed git to:

a) generate an error when Type=dbus is set, but BusName= isn't
b) generate a warning if BusName= is set, but Type=dbus isn't
c) imply Type=dbus if BusName= is set, but Type= isn't explicitly

This should help detecting mistakes like this, and also allows us to
shorten the usual dbus unit files.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list