[systemd-devel] is-enabled and generated units

Andrei Borzenkov arvidjaar at gmail.com
Sun Jun 14 04:22:36 PDT 2015


В Sun, 14 Jun 2015 12:36:39 +0200
Igor Bukanov <igor at mir2.org> пишет:

> On 14 June 2015 at 12:22, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
> > So it can be discussed what should be returned in this case, but in any
> > case "systemctl is-enabled" is not expected to return "enabled-runtime"
> > here.
> 
> Indeed, I see that it should not be `enabled-runtime"` as the unit
> does not contain [Install].
> 
> Still why systemctl does not return `static` in this case but fails
> with an error message? I also see that systemctl fails with the same
> error message for generated units that are linked via .wants under
> /run/systemd/generator when my expectation is that the command should
> succeed and print `linked-runtime`.

Currently generator paths are explicitly excluded from systemctl
operations. I think systemd should distinguish between runtime and
generators. One reason is, generated units are meant to be "enabled" by
definition - they are usually created to be included in transaction. 

So if something should be returned it should be "generated"; not sure
which qualifications make sense here.


More information about the systemd-devel mailing list