Hi Michal,

On Thu, Aug 8, 2013 at 3:19 PM, Michal Sekletar <[email protected]> wrote:
> Calling enable on template units doesn't make sense since it is possible
> to enable instances directly and users are not forced to use Alias=
> trickery anymore.

It actually might make sense to still call enable on a template unit
with an Alias:

Imagine [email protected] with [email protected]. In this case you want to
be able to do "systemctl enable [email protected]", and then "systemctl
start [email protected]" should start the instance [email protected]. An
example where this would be useful is for "systemctl enable
[email protected]" to make the kmsconvt template override the autovt
template.

However, we definitely don't want to allow a template name in
WantedBy= or RequiredBy= (this doesn't make any sense as "systemctl
start [email protected]" is invalid).

Currently we don't really verify what is given in
Alias/WantedBy/RequiredBy at all at enable time (only at runtime), but
I think we should do this using unit_name_is_valid(name,true) for
Alias and unit_name_is_valid(name,false) for the other two.

What do you think?

Cheers,

Tom
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to