summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-16 03:29:54 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-16 03:29:54 +0200
commit3d3961f26770b2949a30a72457e1660969bc17b8 (patch)
tree1856ca4eb397935d1327eb4a5497e6855724530e /src/systemctl.c
parente02cd6f7e039b020a2782c61ea7a84c3ad85ca17 (diff)
systemctl: always consider unit files with no [Install] section but stored in /lib enabled
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 0a72874145..39901c3674 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -4152,6 +4152,15 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
return -ENOENT;
}
+ /* Consider unit files stored in /lib and /usr always enabled
+ * if they have no [Install] data. */
+ if (streq(verb, "is-enabled") &&
+ strv_isempty(i->aliases) &&
+ strv_isempty(i->wanted_by) &&
+ (path_startswith(filename, "/lib") ||
+ path_startswith(filename, "/usr")))
+ return 1;
+
i->path = filename;
if ((r = config_parse(filename, f, NULL, items, true, i)) < 0) {