From 0ca66adfcc47c34b61331ea1cdea90435f9f92f1 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 22 Nov 2023 19:04:29 +0800 Subject: [PATCH] conf-parser: only read the first found main config file Follow-up for 93f1da45566d064f4f053b37bbac2813631f58b1 and 8ea288db018c7dfe0016d51d4538539bab4ab6de Before the offending commits, we only read the first found main config file. If the main config file is symlinked to/as a drop-in, we should break instead of continuing, for it to be read later. --- src/shared/conf-parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 12312f55008..59a529d4bcb 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -557,7 +557,7 @@ static int config_parse_many_files( if (set_contains(inodes, &st)) { log_debug("%s: symlink to/symlinked as drop-in, will be read later.", *fn); - continue; + break; } } @@ -571,6 +571,8 @@ static int config_parse_many_files( if (r < 0) return r; } + + break; } /* Then read all the drop-ins. */ -- 2.47.3