[systemd-devel] is-enabled and generated units

Lennart Poettering lennart at poettering.net
Sun Jun 14 15:40:56 PDT 2015


On Sun, 14.06.15 11:17, Igor Bukanov (igor at mir2.org) wrote:

> Hello,
> 
> I noticed that running `systemctl is-enabled foo.service` against a
> service written by a generator fails with a puzzling error message:
> 
> Failed to get unit file state for foo.service: No such file or directory
> 
> when I expected that the command succeeds and prints enabled-runtime
> as the unit was enabled through a target file
> /run/systemd/generator/multi-user.target.d/foo.conf containing:
> 
> [Unit]
> Wants=foo.service
> 
> Is it a bug?

Well, yes. We should include the generator unit dirs in the unit
search paths for the enable/disable/is-enabled code, and we currently
don't, hence don't even see the unit if you call that code. We should
add it.

Added to the TODO list.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list