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
This commit is contained in:
Jan Synacek
2014-11-10 19:58:21 +01:00
committed by Lennart Poettering
parent f81e67f79f
commit aedd4012f4
4 changed files with 41 additions and 18 deletions
+3 -4
View File
@@ -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)