3d083b2245
Previously, we'd explicitly use "GetUnit()" on the server side to convert a unit name into a bus path, as that function will return an error if the unit is not currently loaded. If we'd convert the path on the client side, and access the unit this way directly the unit would be loaded automatically in the background. The old logic was done in order to minimize the effect of "is-active" on the system, i.e. that a monoitoring command does not itself alter the state of the system. however, this is problematic as this can lead to confusing results if the queried unit name is an alias that currently is not loaded: we'd claim the unit wasn't active even though this isn't strictly true: the unit the name is an alias for might be. Hence, let's simplify the code, and accept that we might end up loading a unit briefly here, and let's make "systemctl is-active" skip the GetUnit() thing and calculate the unit path right away. Fixes: #7875 |
||
---|---|---|
.. | ||
systemctl.c | ||
systemd-sysv-install.SKELETON |