[systemd-devel] Clarification on unit state meanings

Lennart Poettering lennart at poettering.net
Thu Aug 10 10:39:35 UTC 2017


On Mi, 09.08.17 20:10, James Forcier (james.forcier at coreos.com) wrote:

> 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...

> 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...

> 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


More information about the systemd-devel mailing list