From: Luca Boccassi Date: Tue, 5 Jan 2021 13:44:26 +0000 (+0000) Subject: systemctl: have is-enabled return success for aliases when calling into pid1 too X-Git-Tag: v248-rc1~426 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf3b428f73eb51f4abb64a80ea5be346b9eeb2fe;p=thirdparty%2Fsystemd.git systemctl: have is-enabled return success for aliases when calling into pid1 too commit 15d7ab87c4e5917f5788f1f8dce327a1e272bea3 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 --- diff --git a/src/systemctl/systemctl-is-enabled.c b/src/systemctl/systemctl-is-enabled.c index 02ef8df86e4..babd5902c98 100644 --- a/src/systemctl/systemctl-is-enabled.c +++ b/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) {