From 4943d14306c3e456525fdb793e7f48efea5b9236 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 7 Apr 2016 18:48:01 +0200 Subject: 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. --- src/sysv-generator/sysv-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sysv-generator') diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c index fb7c47e1c8..e44304c16a 100644 --- a/src/sysv-generator/sysv-generator.c +++ b/src/sysv-generator/sysv-generator.c @@ -1004,7 +1004,7 @@ int main(int argc, char *argv[]) { umask(0022); - r = lookup_paths_init(&lp, UNIT_FILE_SYSTEM, NULL); + r = lookup_paths_init(&lp, UNIT_FILE_SYSTEM, LOOKUP_PATHS_EXCLUDE_GENERATED, NULL); if (r < 0) { log_error_errno(r, "Failed to find lookup paths: %m"); goto finish; -- cgit v1.2.3-54-g00ecf