Discussion:
Clarification on unit state meanings
(too old to reply)
James Forcier
2017-08-10 03:10:26 UTC
Permalink
Raw Message
Hey all,

I noticed some odd ways `systemctl status` reports the status of units when
they're enabled via symlinks in target.{wants,requires} directories in /usr. In
particular, units with Install sections enabled this way show as disabled,
although they start with the target as expected.

I've done some work on a patch to fix this (also taking into account symlinks to
/dev/null in target.{wants,requires} directories) but I'm not entirely sure what
the exact correct behavior is. Apparently the table explaining unit states in
systemctl's manpage is out of date; is there a more complete listing anywhere of
what scenarios correspond to what states? If not, what's the expected behavior
here?

--
Thanks,
James Forcier
Lennart Poettering
2017-08-10 10:39:35 UTC
Permalink
Raw Message
Post by James Forcier
Hey all,
I noticed some odd ways `systemctl status` reports the status of units when
they're enabled via symlinks in target.{wants,requires} directories in /usr. In
particular, units with Install sections enabled this way show as disabled,
although they start with the target as expected.
Units that are enabled though symlinks in /usr aren't really supposed
to have [Install] sections, as they are unconditionally enabled anyway...
Post by James Forcier
I've done some work on a patch to fix this (also taking into account symlinks to
/dev/null in target.{wants,requires} directories) but I'm not entirely sure what
the exact correct behavior is.
There were plans to make it possible to mask dependencies by placing
/dev/null symlinks in .wants/ or .requires/ but that never
materialized. And until it does doing that is not supported, and the
effect undefined...
Post by James Forcier
Apparently the table explaining unit states in
systemctl's manpage is out of date; is there a more complete listing anywhere of
what scenarios correspond to what states? If not, what's the expected behavior
here?
The man page is the most current documentation of unit file
states. Can you elaborate what precisely you are missing in it at the
moment?

Lennart
--
Lennart Poettering, Red Hat
Loading...