14.05.2019 16:39, Ulrich Windl пишет:
> Hi!
> Developing my first systemd service I have some problems I don't understand:
> After installation, I get this status:
> # systemctl status iotwatch.target          ● iotwatch.target - iotwatch I/O
> performance monitor
>    Loaded: loaded (/run/systemd/generator.late/iotwatch.target; bad; vendor
> preset: disabled)
>    Active: inactive (dead)
>      Docs: man:iotwatch@.service(8)
>            man:iotwatch-generator(8)
> Why "bad"? 

Again - this has improved in current version which now tells you that
unit is generated.

> # ll /run/systemd/generator.late/iotwatch.target
> -rw-r--r-- 1 root root 281 May 14 15:24
> /run/systemd/generator.late/iotwatch.target
> # systemctl is-enabled iotwatch.target
> Failed to get unit file state for iotwatch.target: No such file or directory
> Here we are again: Where should the file be?
> Aren't targets allowed to be generated?

Targets are allowed to be generated but generated units cannot be
enabled/disabled. The rationale probably is that if you create unit file
you can just as well create symlink to this unit file. Also "systemctl
dameon-reload" removes and re-creates all generated units, so any
symlink to such unit outside of generated subdirectories potentially
becomes invalid.

Documentation could be better indeed.
systemd-devel mailing list

Reply via email to