D-Bus Service Activation through Upstart

Zygmunt Krynicki zygmunt.krynicki at canonical.com
Wed Dec 22 18:11:12 UTC 2010


W dniu 22.12.2010 19:03, Scott James Remnant pisze:

> With the most recent upload of D-Bus (1.4.1-0ubuntu2) it is now possible
> for D-Bus services to be activated via Upstart.
>
> For example, let's say we wanted to convert the existing
> com.ubuntu.LanguageSelector service over.  First you need to edit the
> D-Bus service file:
>
> /usr/share/dbus-1/system-services/com.ubuntu.LanguageSelector.service
>
>           [D-BUS Service]
>           Name=com.ubuntu.LanguageSelector
>           Exec=/usr/lib/language-selector/ls-dbus-backend
>           User=root
> +      UpstartJob=y
>
> (I've marked the new UpstartJob=y line you need to add)
>
> Next create an Upstart Job for it
>
> /etc/init/LanguageSelector.conf
>
>       start on dbus-activation com.ubuntu.LanguageSelector
>       exec /usr/lib/language-selector/ls-dbus-backend

Could upstart by any chance reuse the Exec line from the .service file.
It seems that repeating this is a DRY violation that makes no practical 
sense. I realize that it makes upstart's job harder (need to track and 
parse another file but from administrator's point of view it makes lots 
of sense).

Best regards
ZK



More information about the ubuntu-devel mailing list