diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-04-07 18:48:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-12 13:43:32 +0200 |
commit | 4943d14306c3e456525fdb793e7f48efea5b9236 (patch) | |
tree | 01ebe6e1d8ff0563f279d45e78c8ddfc0723a164 /src/core/manager.c | |
parent | a69b4fb0f80689b96f492a557368ed880365edee (diff) |
systemctl: don't confuse sysv code with generated units
The SysV compat code checks whether there's a native unit file before looking
for a SysV init script. Since the newest rework generated units will show up in
the unit path, and hence the checks ended up assuming that there always was a
native unit file for each init script: the generated one.
With this change the generated unit file directory is suppressed from the
search path when this check is done, to avoid the confusion.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 91fe9c2d5b..5601770670 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1097,7 +1097,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { assert(m); - r = lookup_paths_init(&m->lookup_paths, m->unit_file_scope, NULL); + r = lookup_paths_init(&m->lookup_paths, m->unit_file_scope, 0, NULL); if (r < 0) return r; @@ -2524,7 +2524,7 @@ int manager_reload(Manager *m) { lookup_paths_flush_generator(&m->lookup_paths); lookup_paths_free(&m->lookup_paths); - q = lookup_paths_init(&m->lookup_paths, m->unit_file_scope, NULL); + q = lookup_paths_init(&m->lookup_paths, m->unit_file_scope, 0, NULL); if (q < 0 && r >= 0) r = q; |