systemctl: have is-enabled return success for aliases when calling into pid1 too

commit 15d7ab87c4 introduced the
change to add an 'alias' state, but it was wired to systemctl
only when running in 'client-side' mode. Return success as
expected and documented also when running in 'server-mode'.

Fixes https://github.com/systemd/systemd/issues/18134
This commit is contained in:
Luca Boccassi 2021-01-05 13:44:26 +00:00 committed by Lennart Poettering
parent 0ec1dc5ba3
commit bf3b428f73
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ int unit_is_enabled(int argc, char *argv[], void *userdata) {
if (r < 0)
return bus_log_parse_error(r);
if (STR_IN_SET(s, "enabled", "enabled-runtime", "static", "indirect", "generated"))
if (STR_IN_SET(s, "enabled", "enabled-runtime", "static", "alias", "indirect", "generated"))
enabled = true;
if (!arg_quiet) {