[systemd-devel] Can /usr/lib/systemd/user/sockets.target.wants be used to autoenable a socket by a vendor package?

Yuri Kanivetsky yuri.kanivetsky at gmail.com
Mon Oct 10 10:48:23 UTC 2022


After experimenting some more, I can see that if there's no [Install]
section and the unit is enabled by putting it into
/usr/lib/systemd/*/*.target.wants, then is-enabled is static, and
`systemctl enable` does nothing and explains the situation. Which
makes me think that one should either add the [Install] section, or
enable a unit via /usr/lib/systemd/*/*.target.wants. If both are done,
is-enabled is disabled, and one can enable it twice (provide a second
route). Which probably is not particularly bad, but is confusing.

On Tue, Sep 20, 2022 at 11:23 AM Andrei Borzenkov <arvidjaar at gmail.com> wrote:
>
> On Tue, Sep 20, 2022 at 10:42 AM Barry <barry at barrys-emacs.org> wrote:
> >
> > Enabled does mean that it will or will not run.
> > It means that it is wanted by the default target.
> >
>
> No. It means that it is wanted by whatever units are listed in
> [Install] section (actually, it is "enabled" even if only aliases are
> created, so more correct is - it is enabled if links mentioned in
> [Install] section are created).


More information about the systemd-devel mailing list