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
master
Luca Boccassi 2 years ago committed by Lennart Poettering
parent 0ec1dc5ba3
commit bf3b428f73
  1. 2
      src/systemctl/systemctl-is-enabled.c

@ -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) {

Loading…
Cancel
Save