On Wed, 22.07.15 20:28, Michael Biebl (mbi...@gmail.com) wrote: > 2015-07-22 19:15 GMT+02:00 Lennart Poettering <lenn...@poettering.net>: > > On Tue, 21.07.15 13:43, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: > >> Can I write my nifty.target as a service? I have seen in this case > >> nifty.service files with Exec=/bin/true to basically create a no-op > >> service, but that's ugly. > > > > That's a hack. A target is for grouping things, they basically are > > services without processes attached to them. You really should use > > targets for this, and not misuse services. > > Afaik, there is no way to have a .target reloaded and that reload > request propagated to all services in that target. > > Say you have foo.target consisting of bar.service and baz.service, > how can you achieve that > systemctl reload foo.target propagates that reload request to > {bar,baz}.service?
You cannot do that right now, and I am not sure you should be able to, after all the operation does not really apply to target units. I do see your usecase though... Humm... Maybe we can change the manager core to propagate Reload() calls for unit type that do not support it natively to other units listed in PropagateReloadsTo= and then become a NOP. Or in other words: invoking reload on a target that knows no PropagateReloadsTo= should continue to return an error. But if such deps are defined, it should become a silent NOP and propagate the event. Could you file an RFP issue on github asking for this? [or even better, send a PR with a patch... ;-) ] Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel