]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: have is-enabled return success for aliases when calling into pid1 too
authorLuca Boccassi <bluca@debian.org>
Tue, 5 Jan 2021 13:44:26 +0000 (13:44 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 6 Jan 2021 16:39:18 +0000 (17:39 +0100)
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

src/systemctl/systemctl-is-enabled.c

index 02ef8df86e4a51f5b9b3c0b7100f50ee1c7622ad..babd5902c9855330e8107042ca9a65bb7c604088 100644 (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) {