[systemd-devel] [feature request] allow instances in file.preset

Lennart Poettering lennart at poettering.net
Thu Oct 2 08:32:07 PDT 2014


On Thu, 02.10.14 16:28, Colin Guthrie (gmane at colin.guthr.ie) wrote:

> > Well, but from somewhere systemctl preset-all needs to be able to
> > discover the "bar" string... How is that supposed to work?
> > 
> > preset-all just enumerates all unit files that are installed and
> > enables/disables them according to the preset file. But this means it
> > would only find the template, and the instance would have to come from
> > somewhere else, but where?
> 
> Would it be possible for the .preset file to just specify foo at .service
> and then the code that actually enables it just process the
> DefaultInstance rule as normal?

That should already work, no?

> As you mentioned earlier, the [Install] section cannot be overridden via
> drop-ins, but shouldn't systemctl preset-all honour DefaultInstance=
> directive properly without having to duplicate that info into a .preset
> file?

Yes, it should.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list