From aedd4012f437a0b08c34f40a5bb97b6e615ac074 Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Fri, 7 Nov 2014 21:21:05 +0100 Subject: shared/install: when unit contains only Also=, report 'indirect' If a unit contains only Also=, with no Alias= or WantedBy=, it shouldn't be reported as static. New 'indirect' status shall be introduced. https://bugzilla.redhat.com/show_bug.cgi?id=864298 --- src/systemctl/systemctl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/systemctl') diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index c903c54e9b..78b7c963e8 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -5660,7 +5660,8 @@ static int unit_is_enabled(sd_bus *bus, char **args) { if (state == UNIT_FILE_ENABLED || state == UNIT_FILE_ENABLED_RUNTIME || - state == UNIT_FILE_STATIC) + state == UNIT_FILE_STATIC || + state == UNIT_FILE_INDIRECT) enabled = true; if (!arg_quiet) @@ -5690,9 +5691,7 @@ static int unit_is_enabled(sd_bus *bus, char **args) { if (r < 0) return bus_log_parse_error(r); - if (streq(s, "enabled") || - streq(s, "enabled-runtime") || - streq(s, "static")) + if (STR_IN_SET(s, "enabled", "enabled-runtime", "static", "indirect")) enabled = true; if (!arg_quiet) -- cgit v1.2.3-54-g00ecf