Start of systemd timers after install/update of a package

Lennart Poettering mzerqung at 0pointer.de
Fri Jan 25 18:32:27 UTC 2013


On Fri, 25.01.13 08:36, "Jóhann B. Guðmundsson" (johannbg at gmail.com) wrote:

> On 01/24/2013 11:53 PM, Lennart Poettering wrote:
> >a) list them in the "%systemd_post" rpm macro (and the other macros too)
> >    like you would do for service units. Note that "%systemd_post" and
> >    friends take an arbitrary amount of unit names. To enable these timer
> >    units by default, you'd also need to get them listed in the fedora
> >    preset files.
> 
> Hmm if that is the case it probably is better that each package
> ships it's own preset file snipped which will enabled/disable
> relevant units that package ships.

That's a clear "no".

Preset files shall never be shipped by their own packages. That defeats
their point.

If you have a unit file that you are sure should be unconditionally
enabled, then enable them via a .wants/ link /usr, rather than in
/etc. But really, we do that for very few services only, and we
shouldn't do that for timer units either really, as that only leaves
masking as a way for the admin to disable these units.

I am pretty sure the Also= link in a service units' [Install] section is
the best way to go for most packages.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list