[systemd-devel] propagate reload from other events

Lennart Poettering lennart at poettering.net
Wed Oct 14 07:41:25 PDT 2015


On Sat, 10.10.15 21:14, Johannes Ernst (johannes.ernst at gmail.com) wrote:

> I understand that if foo.service specifies:
> 
> PropagatesReloadTo=bar.service
> 
> and I execute “systemctl reload foo”, this will trigger a reload of bar as well. Typically I might do that if I have changed some config file, and I want the daemon(s) to pick it up.
> 
> Is there a similar mechanism that triggers a reload in bar when foo stops, or when foo starts, or events like that?
> 
> I found a thread from 3 years ago on an OnStop= rule, but I don’t think that made it into the mainline? [1]
> 
> My use case is that if I switch from foo.service to foo2.service
> (both require bar, and are mutually exclusive to each other), I’d
> like bar to reload.

We currently do not support that, and I am not convinced we should
support that. We don't want systemd deps to become a generic Turing
complete language really. 

In your specific networkd-related case I figure the right fix is to
add a bus interface to networkd to make it dynamically configurable
without doing a full reload/retstar of the daemon. And we are working
on that.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list